1 /***********************************************************************\ 2 * dhcpcsdk.d * 3 * * 4 * Windows API header module * 5 * * 6 * Translated from MinGW Windows headers * 7 * by Stewart Gordon * 8 * * 9 * Placed into public domain * 10 \***********************************************************************/ 11 module win32.dhcpcsdk; 12 version(Windows): 13 14 private import win32.w32api, win32.windef; 15 16 static assert (_WIN32_WINNT >= 0x500, 17 "win32.dhcpcsdk is available only if version Windows2000, WindowsXP, Windows2003 18 or WindowsVista is set"); 19 20 //#if (_WIN32_WINNT >= 0x500) 21 22 // FIXME: check type 23 const DHCPCAPI_REGISTER_HANDLE_EVENT = 1; 24 const DHCPCAPI_REQUEST_PERSISTENT = 1; 25 const DHCPCAPI_REQUEST_SYNCHRONOUS = 2; 26 27 struct DHCPCAPI_CLASSID { 28 ULONG Flags; 29 LPBYTE Data; 30 ULONG nBytesData; 31 } 32 alias DHCPCAPI_CLASSID* PDHCPCAPI_CLASSID, LPDHCPCAPI_CLASSID; 33 34 struct DHCPAPI_PARAMS { 35 ULONG Flags; 36 ULONG OptionId; 37 BOOL IsVendor; 38 LPBYTE Data; 39 DWORD nBytesData; 40 } 41 alias DHCPAPI_PARAMS* PDHCPAPI_PARAMS, LPDHCPAPI_PARAMS; 42 43 struct DHCPCAPI_PARAMS_ARRAY { 44 ULONG nParams; 45 LPDHCPAPI_PARAMS Params; 46 } 47 alias DHCPCAPI_PARAMS_ARRAY* PDHCPCAPI_PARAMS_ARRAY, LPDHCPCAPI_PARAMS_ARRAY; 48 49 extern (Windows) { 50 void DhcpCApiCleanup(); 51 DWORD DhcpCApiInitialize(LPDWORD); 52 DWORD DhcpDeRegisterParamChange(DWORD, LPVOID, LPVOID); 53 DWORD DhcpRegisterParamChange(DWORD, LPVOID, PWSTR, LPDHCPCAPI_CLASSID, 54 DHCPCAPI_PARAMS_ARRAY, LPVOID); 55 DWORD DhcpRemoveDNSRegistrations(); 56 DWORD DhcpUndoRequestParams(DWORD, LPVOID, LPWSTR, LPWSTR); 57 } 58 59 //#endif // (_WIN32_WINNT >= 0x500)