From: Austin English Subject: dhcpcsvc: add a stub for DhcpRequestParams (try 2) Message-Id: Date: Tue, 27 Oct 2015 01:05:06 -0500 -- -Austin From 1671935f38c35fd944397f052970f97ceaef012a Mon Sep 17 00:00:00 2001 From: Austin English Date: Mon, 26 Oct 2015 23:33:30 -0500 Subject: [PATCH] dhcpcsvc: add a stub for DhcpRequestParams (try 2) Based on a patch by Mike Ellery Signed-off-by: Austin English --- dlls/dhcpcsvc/dhcpcsvc.c | 12 +++++++++ dlls/dhcpcsvc/dhcpcsvc.spec | 2 +- include/dhcpcsdk.h | 61 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 include/dhcpcsdk.h diff --git a/dlls/dhcpcsvc/dhcpcsvc.c b/dlls/dhcpcsvc/dhcpcsvc.c index 3600680..3ad4e57 100644 --- a/dlls/dhcpcsvc/dhcpcsvc.c +++ b/dlls/dhcpcsvc/dhcpcsvc.c @@ -21,6 +21,8 @@ #include "winbase.h" #include "wine/debug.h" +#include "dhcpcsdk.h" + WINE_DEFAULT_DEBUG_CHANNEL(dhcpcsvc); BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) @@ -37,3 +39,13 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) } return TRUE; } + +DWORD WINAPI DhcpRequestParams( DWORD flags, void *reserved, WCHAR *adaptername, LPDHCPCAPI_CLASSID classid, + DHCPCAPI_PARAMS_ARRAY sendparams, DHCPCAPI_PARAMS_ARRAY recdparams, + BYTE *buffer, DWORD *size, WCHAR *requestiddtr ) +{ + FIXME("(%08x, %p, %s, %p, %u, %u, %p, %p, %s): stub\n", flags, reserved, wine_dbgstr_w(adaptername), classid, + sendparams.nParams, recdparams.nParams, buffer, size, + debugstr_w(requestiddtr)); + return ERROR_SUCCESS; +} diff --git a/dlls/dhcpcsvc/dhcpcsvc.spec b/dlls/dhcpcsvc/dhcpcsvc.spec index 97194a6..48e04f6 100644 --- a/dlls/dhcpcsvc/dhcpcsvc.spec +++ b/dlls/dhcpcsvc/dhcpcsvc.spec @@ -31,7 +31,7 @@ @ stub DhcpRenewIpAddressLeaseEx @ stub DhcpRequestCachedParams @ stub DhcpRequestOptions -@ stub DhcpRequestParams +@ stdcall DhcpRequestParams(long ptr wstr long long long ptr ptr wstr) @ stub DhcpSetMSFTVendorSpecificOptions @ stub DhcpStaticRefreshParams @ stub DhcpUndoRequestParams diff --git a/include/dhcpcsdk.h b/include/dhcpcsdk.h new file mode 100644 index 0000000..928f12a --- /dev/null +++ b/include/dhcpcsdk.h @@ -0,0 +1,61 @@ +/* + * dhcpcsdk.h + * Copyright 2015 Austin English + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _DHCPCDSK_H +#define _DHCPCDSK_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define DHCPCAPI_REGISTER_HANDLE_EVENT 0x00000001 +#define DHCPCAPI_REQUEST_PERSISTENT 0x00000001 +#define DHCPCAPI_REQUEST_SYNCHRONOUS 0x00000002 + +typedef struct _DHCPAPI_CLASSID { + ULONG Flags; + BYTE *Data; + ULONG nBytesData; +} DHCPCAPI_CLASSID,*PDHCPCAPI_CLASSID,*LPDHCPCAPI_CLASSID; + +typedef struct _DHCPAPI_PARAMS { + ULONG Flags; + ULONG OptionId; + BOOL IsVendor; + BYTE *Data; + DWORD nBytesData; +} DHCPAPI_PARAMS,*PDHCPAPI_PARAMS,*LPDHCPAPI_PARAMS; + +typedef struct _DHCPAPI_PARAMS_ARRAY { + ULONG nParams; + LPDHCPAPI_PARAMS Params; +} DHCPCAPI_PARAMS_ARRAY,*PDHCPCAPI_PARAMS_ARRAY,*LPDHCPCAPI_PARAMS_ARRAY; + +void WINAPI DhcpCApiCleanup(void); +DWORD WINAPI DhcpCApiInitialize(DWORD *); +DWORD WINAPI DhcpDeRegisterParamChange(DWORD,void *,void *); +DWORD WINAPI DhcpRegisterParamChange(DWORD,void *,WCHAR *,LPDHCPCAPI_CLASSID,DHCPCAPI_PARAMS_ARRAY,void *); +DWORD WINAPI DhcpRemoveDNSRegistrations(void); +DWORD WINAPI DhcpUndoRequestParams(DWORD,void *,WCHAR *,WCHAR *); + +#ifdef __cplusplus +} +#endif + +#endif /* _DHCPCDSK_H */ -- 2.6.1