The OpenD Programming Language

1 /**
2  * Windows API header module
3  *
4  * Translated from MinGW Windows headers
5  *
6  * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
7  * Source: $(DRUNTIMESRC core/sys/windows/_lmremutl.d)
8  */
9 module core.sys.windows.lmremutl;
10 version (Windows):
11 pragma(lib, "netapi32");
12 
13 // D Conversion Note: DESC_CHAR is defined as TCHAR.
14 
15 import core.sys.windows.lmcons, core.sys.windows.windef;
16 
17 enum SUPPORTS_REMOTE_ADMIN_PROTOCOL =  2;
18 enum SUPPORTS_RPC                   =  4;
19 enum SUPPORTS_SAM_PROTOCOL          =  8;
20 enum SUPPORTS_UNICODE               = 16;
21 enum SUPPORTS_LOCAL                 = 32;
22 enum SUPPORTS_ANY                   = 0xFFFFFFFF;
23 
24 enum NO_PERMISSION_REQUIRED = 1;
25 enum ALLOCATE_RESPONSE      = 2;
26 enum USE_SPECIFIC_TRANSPORT = 0x80000000;
27 
28 //[Yes] #ifndef DESC_CHAR_UNICODE
29 //alias CHAR DESC_CHAR;
30 //} else {
31 //[No] #else
32 //[No] typedef WCHAR DESC_CHAR;
33 //[No] #endif
34 // FIXME (D): Is this OK?
35 alias TCHAR DESC_CHAR;
36 
37 alias DESC_CHAR* LPDESC;
38 
39 struct TIME_OF_DAY_INFO {
40     DWORD tod_elapsedt;
41     DWORD tod_msecs;
42     DWORD tod_hours;
43     DWORD tod_mins;
44     DWORD tod_secs;
45     DWORD tod_hunds;
46     LONG  tod_timezone;
47     DWORD tod_tinterval;
48     DWORD tod_day;
49     DWORD tod_month;
50     DWORD tod_year;
51     DWORD tod_weekday;
52 }
53 alias TIME_OF_DAY_INFO* PTIME_OF_DAY_INFO, LPTIME_OF_DAY_INFO;
54 
55 extern (Windows) {
56     NET_API_STATUS NetRemoteTOD(LPCWSTR, PBYTE*);
57     NET_API_STATUS NetRemoteComputerSupports(LPCWSTR, DWORD, PDWORD);
58     NET_API_STATUS RxRemoteApi(DWORD, LPCWSTR, LPDESC, LPDESC, LPDESC,
59       LPDESC, LPDESC, LPDESC, LPDESC, DWORD, ...);
60 }