1 /***********************************************************************\
2 *                              lmbrowsr.d                               *
3 *                                                                       *
4 *                       Windows API header module                       *
5 *                                                                       *
6 *                 Translated from MinGW Windows headers                 *
7 *                                                                       *
8 *                       Placed into public domain                       *
9 \***********************************************************************/
10 module windows.lmbrowsr;
11 
12 private import windows.lmcons, windows.windef;
13 nothrow:
14 const BROWSER_ROLE_PDC = 1;
15 const BROWSER_ROLE_BDC = 2;
16 
17 struct BROWSER_STATISTICS {
18 	LARGE_INTEGER StatisticsStartTime;
19 	LARGE_INTEGER NumberOfServerAnnouncements;
20 	LARGE_INTEGER NumberOfDomainAnnouncements;
21 	ULONG NumberOfElectionPackets;
22 	ULONG NumberOfMailslotWrites;
23 	ULONG NumberOfGetBrowserServerListRequests;
24 	ULONG NumberOfServerEnumerations;
25 	ULONG NumberOfDomainEnumerations;
26 	ULONG NumberOfOtherEnumerations;
27 	ULONG NumberOfMissedServerAnnouncements;
28 	ULONG NumberOfMissedMailslotDatagrams;
29 	ULONG NumberOfMissedGetBrowserServerListRequests;
30 	ULONG NumberOfFailedServerAnnounceAllocations;
31 	ULONG NumberOfFailedMailslotAllocations;
32 	ULONG NumberOfFailedMailslotReceives;
33 	ULONG NumberOfFailedMailslotWrites;
34 	ULONG NumberOfFailedMailslotOpens;
35 	ULONG NumberOfDuplicateMasterAnnouncements;
36 	LARGE_INTEGER NumberOfIllegalDatagrams;
37 }
38 alias BROWSER_STATISTICS* PBROWSER_STATISTICS, LPBROWSER_STATISTICS;
39 
40 struct BROWSER_STATISTICS_100 {
41 	LARGE_INTEGER StartTime;
42 	LARGE_INTEGER NumberOfServerAnnouncements;
43 	LARGE_INTEGER NumberOfDomainAnnouncements;
44 	ULONG NumberOfElectionPackets;
45 	ULONG NumberOfMailslotWrites;
46 	ULONG NumberOfGetBrowserServerListRequests;
47 	LARGE_INTEGER NumberOfIllegalDatagrams;
48 }
49 alias BROWSER_STATISTICS_100* PBROWSER_STATISTICS_100;
50 
51 struct BROWSER_STATISTICS_101 {
52 	LARGE_INTEGER StartTime;
53 	LARGE_INTEGER NumberOfServerAnnouncements;
54 	LARGE_INTEGER NumberOfDomainAnnouncements;
55 	ULONG NumberOfElectionPackets;
56 	ULONG NumberOfMailslotWrites;
57 	ULONG NumberOfGetBrowserServerListRequests;
58 	LARGE_INTEGER NumberOfIllegalDatagrams;
59 	ULONG NumberOfMissedServerAnnouncements;
60 	ULONG NumberOfMissedMailslotDatagrams;
61 	ULONG NumberOfMissedGetBrowserServerListRequests;
62 	ULONG NumberOfFailedServerAnnounceAllocations;
63 	ULONG NumberOfFailedMailslotAllocations;
64 	ULONG NumberOfFailedMailslotReceives;
65 	ULONG NumberOfFailedMailslotWrites;
66 	ULONG NumberOfFailedMailslotOpens;
67 	ULONG NumberOfDuplicateMasterAnnouncements;
68 }
69 alias BROWSER_STATISTICS_101* PBROWSER_STATISTICS_101;
70 
71 extern (Windows) {
72 	NET_API_STATUS I_BrowserServerEnum(LPCWSTR, LPCWSTR, LPCWSTR, DWORD,
73 	  PBYTE*, DWORD, PDWORD, PDWORD, DWORD, LPCWSTR, PDWORD);
74 	NET_API_STATUS I_BrowserServerEnumEx(LPCWSTR, LPCWSTR, LPCWSTR, DWORD,
75 	  PBYTE*, DWORD, PDWORD, PDWORD, DWORD, LPCWSTR, LPCWSTR);
76 	NET_API_STATUS I_BrowserQueryEmulatedDomains(LPWSTR, PBYTE*, PDWORD);
77 	NET_API_STATUS I_BrowserQueryOtherDomains(LPCWSTR, PBYTE*, PDWORD, PDWORD);
78 	NET_API_STATUS I_BrowserResetNetlogonState(LPCWSTR);
79 	NET_API_STATUS I_BrowserSetNetlogonState(LPWSTR, LPWSTR, LPWSTR, DWORD);
80 	NET_API_STATUS I_BrowserQueryStatistics(LPCWSTR, LPBROWSER_STATISTICS*);
81 	NET_API_STATUS I_BrowserResetStatistics(LPCWSTR);
82 	WORD I_BrowserServerEnumForXactsrv(LPCWSTR, LPCWSTR, ULONG, USHORT, PVOID,
83 	  WORD, DWORD, PDWORD, PDWORD, DWORD, LPCWSTR, LPCWSTR, PWORD);
84 	NET_API_STATUS I_BrowserDebugTrace(PWCHAR, PCHAR);
85 }