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 win32.lmremutl;
11 version(Windows):
12 pragma(lib, "netapi32");
13 
14 // D Conversion Note: DESC_CHAR is defined as TCHAR.
15 
16 private import win32.lmcons, win32.windef;
17 
18 const SUPPORTS_REMOTE_ADMIN_PROTOCOL =  2;
19 const SUPPORTS_RPC                   =  4;
20 const SUPPORTS_SAM_PROTOCOL          =  8;
21 const SUPPORTS_UNICODE               = 16;
22 const SUPPORTS_LOCAL                 = 32;
23 const SUPPORTS_ANY                   = 0xFFFFFFFF;
24 
25 const NO_PERMISSION_REQUIRED = 1;
26 const ALLOCATE_RESPONSE      = 2;
27 const USE_SPECIFIC_TRANSPORT = 0x80000000;
28 
29 //[Yes] #ifndef DESC_CHAR_UNICODE
30 //alias CHAR DESC_CHAR;
31 //} else {
32 //[No] #else
33 //[No] typedef WCHAR DESC_CHAR;
34 //[No] #endif
35 // FIXME (D): Is this OK?
36 alias TCHAR DESC_CHAR;
37 
38 alias DESC_CHAR* LPDESC;
39 
40 struct TIME_OF_DAY_INFO {
41 	DWORD tod_elapsedt;
42 	DWORD tod_msecs;
43 	DWORD tod_hours;
44 	DWORD tod_mins;
45 	DWORD tod_secs;
46 	DWORD tod_hunds;
47 	LONG  tod_timezone;
48 	DWORD tod_tinterval;
49 	DWORD tod_day;
50 	DWORD tod_month;
51 	DWORD tod_year;
52 	DWORD tod_weekday;
53 }
54 alias TIME_OF_DAY_INFO* PTIME_OF_DAY_INFO, LPTIME_OF_DAY_INFO;
55 
56 extern (Windows) {
57 	NET_API_STATUS NetRemoteTOD(LPCWSTR, PBYTE*);
58 	NET_API_STATUS NetRemoteComputerSupports(LPCWSTR, DWORD, PDWORD);
59 	NET_API_STATUS RxRemoteApi(DWORD, LPCWSTR, LPDESC, LPDESC, LPDESC,
60 	  LPDESC, LPDESC, LPDESC, LPDESC, DWORD, ...);
61 }