1 /***********************************************************************\
2 *                               lmremutl.d                              *
3 *                                                                       *
4 *                       Windows API header module                       *
5 *                                                                       *
6 *                 Translated from MinGW Windows headers                 *
7 *                                                                       *
8 *                       Placed into public domain                       *
9 \***********************************************************************/
10 module windows.lmremutl;
11 pragma(lib, "netapi32");
12 nothrow:
13 // D Conversion Note: DESC_CHAR is defined as TCHAR.
14 
15 private import windows.lmcons, windows.windef;
16 
17 const SUPPORTS_REMOTE_ADMIN_PROTOCOL =  2;
18 const SUPPORTS_RPC                   =  4;
19 const SUPPORTS_SAM_PROTOCOL          =  8;
20 const SUPPORTS_UNICODE               = 16;
21 const SUPPORTS_LOCAL                 = 32;
22 const SUPPORTS_ANY                   = 0xFFFFFFFF;
23 
24 const NO_PERMISSION_REQUIRED = 1;
25 const ALLOCATE_RESPONSE      = 2;
26 const 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 }