annotate win32/dhcpcsdk.d @ 5:496dfd8f7342 default tip

added: -repeat option for "in", "ov" -run until a line option -run until a function option -break on a function start -n is an alias for ov
author marton@basel.hu
date Sun, 17 Apr 2011 11:05:31 +0200
parents 4a9dcbd9e54f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
1 /***********************************************************************\
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
2 * dhcpcsdk.d *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
3 * *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
4 * Windows API header module *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
5 * *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
6 * Translated from MinGW Windows headers *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
7 * by Stewart Gordon *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
8 * *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
9 * Placed into public domain *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
10 \***********************************************************************/
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
11 module win32.dhcpcsdk;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
12
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
13 private import win32.w32api, win32.windef;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
14
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
15 static assert (_WIN32_WINNT_ONLY && _WIN32_WINNT >= 0x500,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
16 "win32.dhcpcsdk is available only if version WindowsXP, Windows2003
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
17 or WindowsVista is set, or both Windows2000 and WindowsNTonly are set");
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
18
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
19 //#if (_WIN32_WINNT >= 0x0500)
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
20
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
21 // FIXME: check type
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
22 const DHCPCAPI_REGISTER_HANDLE_EVENT = 1;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
23 const DHCPCAPI_REQUEST_PERSISTENT = 1;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
24 const DHCPCAPI_REQUEST_SYNCHRONOUS = 2;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
25
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
26 struct DHCPCAPI_CLASSID {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
27 ULONG Flags;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
28 LPBYTE Data;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
29 ULONG nBytesData;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
30 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
31 alias DHCPCAPI_CLASSID* PDHCPCAPI_CLASSID, LPDHCPCAPI_CLASSID;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
32
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
33 struct DHCPAPI_PARAMS {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
34 ULONG Flags;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
35 ULONG OptionId;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
36 BOOL IsVendor;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
37 LPBYTE Data;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
38 DWORD nBytesData;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
39 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
40 alias DHCPAPI_PARAMS* PDHCPAPI_PARAMS, LPDHCPAPI_PARAMS;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
41
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
42 struct DHCPCAPI_PARAMS_ARRAY {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
43 ULONG nParams;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
44 LPDHCPAPI_PARAMS Params;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
45 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
46 alias DHCPCAPI_PARAMS_ARRAY* PDHCPCAPI_PARAMS_ARRAY, LPDHCPCAPI_PARAMS_ARRAY;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
47
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
48 extern (Windows) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
49 void DhcpCApiCleanup();
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
50 DWORD DhcpCApiInitialize(LPDWORD);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
51 DWORD DhcpDeRegisterParamChange(DWORD, LPVOID, LPVOID);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
52 DWORD DhcpRegisterParamChange(DWORD, LPVOID, PWSTR, LPDHCPCAPI_CLASSID,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
53 DHCPCAPI_PARAMS_ARRAY, LPVOID);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
54 DWORD DhcpRemoveDNSRegistrations();
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
55 DWORD DhcpUndoRequestParams(DWORD, LPVOID, LPWSTR, LPWSTR);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
56 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
57
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
58 //#endif // (_WIN32_WINNT >= 0x0500)