1 /***********************************************************************\
2 *                                lmmsg.d                                *
3 *                                                                       *
4 *                       Windows API header module                       *
5 *                                                                       *
6 *                 Translated from MinGW Windows headers                 *
7 *                                                                       *
8 *                       Placed into public domain                       *
9 \***********************************************************************/
10 module win32.lmmsg;
11 pragma(lib, "netapi32.lib");
12 
13 private import win32.lmcons, win32.windef, win32.w32api;
14 
15 static assert (_WIN32_WINNT_ONLY && _WIN32_WINNT >= 0x501,
16 	"win32.lmmsg is available only if version WindowsXP, Windows2003 "
17 	"or WindowsVista is set");
18 
19 const MSGNAME_NOT_FORWARDED  = 0;
20 const MSGNAME_FORWARDED_TO   = 4;
21 const MSGNAME_FORWARDED_FROM = 16;
22 
23 struct MSG_INFO_0 {
24 	LPWSTR msgi0_name;
25 }
26 alias MSG_INFO_0* PMSG_INFO_0, LPMSG_INFO_0;
27 
28 struct MSG_INFO_1 {
29 	LPWSTR msgi1_name;
30 	DWORD msgi1_forward_flag;
31 	LPWSTR msgi1_forward;
32 }
33 alias MSG_INFO_1* PMSG_INFO_1, LPMSG_INFO_1;
34 
35 extern (Windows) {
36 	NET_API_STATUS NetMessageBufferSend(LPCWSTR, LPCWSTR, LPCWSTR, PBYTE,
37 	  DWORD);
38 	NET_API_STATUS NetMessageNameAdd(LPCWSTR, LPCWSTR);
39 	NET_API_STATUS NetMessageNameDel(LPCWSTR, LPCWSTR);
40 	NET_API_STATUS NetMessageNameEnum(LPCWSTR, DWORD, PBYTE*, DWORD, PDWORD,
41 	  PDWORD, PDWORD);
42 	NET_API_STATUS NetMessageNameGetInfo(LPCWSTR, LPCWSTR, DWORD, PBYTE*);
43 }