The OpenD Programming Language

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