1 /***********************************************************************\
2 *                                rasdlg.d                               *
3 *                                                                       *
4 *                       Windows API header module                       *
5 *                                                                       *
6 *                 Translated from MinGW Windows headers                 *
7 *                           by Stewart Gordon                           *
8 *                                                                       *
9 *                       Placed into public domain                       *
10 \***********************************************************************/
11 module windows.rasdlg;
12 nothrow:
13 import windows.ras;
14 private import windows.lmcons, windows.windef;
15 
16 enum {
17 	RASPBDEVENT_AddEntry = 1,
18 	RASPBDEVENT_EditEntry,
19 	RASPBDEVENT_RemoveEntry,
20 	RASPBDEVENT_DialEntry,
21 	RASPBDEVENT_EditGlobals,
22 	RASPBDEVENT_NoUser,
23 	RASPBDEVENT_NoUserEdit
24 }
25 
26 const RASPBDFLAG_PositionDlg      =  1;
27 const RASPBDFLAG_ForceCloseOnDial =  2;
28 const RASPBDFLAG_NoUser           = 16;
29 
30 const RASEDFLAG_PositionDlg = 1;
31 const RASEDFLAG_NewEntry    = 2;
32 const RASEDFLAG_CloneEntry  = 4;
33 
34 const RASDDFLAG_PositionDlg = 1;
35 
36 align(4):
37 
38 struct RASENTRYDLGA {
39 	DWORD     dwSize = RASENTRYDLGA.sizeof;
40 	HWND      hwndOwner;
41 	DWORD     dwFlags;
42 	LONG      xDlg;
43 	LONG      yDlg;
44 	CHAR[RAS_MaxEntryName + 1] szEntry;
45 	DWORD     dwError;
46 	ULONG_PTR reserved;
47 	ULONG_PTR reserved2;
48 }
49 alias RASENTRYDLGA* LPRASENTRYDLGA;
50 
51 struct RASENTRYDLGW {
52 	DWORD     dwSize = RASENTRYDLGW.sizeof;
53 	HWND      hwndOwner;
54 	DWORD     dwFlags;
55 	LONG      xDlg;
56 	LONG      yDlg;
57 	WCHAR[RAS_MaxEntryName + 1] szEntry;
58 	DWORD     dwError;
59 	ULONG_PTR reserved;
60 	ULONG_PTR reserved2;
61 }
62 alias RASENTRYDLGW* LPRASENTRYDLGW;
63 
64 struct RASDIALDLG {
65 	DWORD     dwSize;
66 	HWND      hwndOwner;
67 	DWORD     dwFlags;
68 	LONG      xDlg;
69 	LONG      yDlg;
70 	DWORD     dwSubEntry;
71 	DWORD     dwError;
72 	ULONG_PTR reserved;
73 	ULONG_PTR reserved2;
74 }
75 alias RASDIALDLG* LPRASDIALDLG;
76 
77 // Application-defined callback functions
78 extern (Windows) {
79 	alias VOID function(DWORD, DWORD, LPWSTR, LPVOID) RASPBDLGFUNCW;
80 	alias VOID function(DWORD, DWORD, LPSTR, LPVOID) RASPBDLGFUNCA;
81 }
82 
83 struct RASPBDLGA {
84 	DWORD         dwSize = RASPBDLGA.sizeof;
85 	HWND          hwndOwner;
86 	DWORD         dwFlags;
87 	LONG          xDlg;
88 	LONG          yDlg;
89 	ULONG_PTR     dwCallbackId;
90 	RASPBDLGFUNCA pCallback;
91 	DWORD         dwError;
92 	ULONG_PTR     reserved;
93 	ULONG_PTR     reserved2;
94 }
95 alias RASPBDLGA* LPRASPBDLGA;
96 
97 struct RASPBDLGW {
98 	DWORD         dwSize = RASPBDLGW.sizeof;
99 	HWND          hwndOwner;
100 	DWORD         dwFlags;
101 	LONG          xDlg;
102 	LONG          yDlg;
103 	ULONG_PTR     dwCallbackId;
104 	RASPBDLGFUNCW pCallback;
105 	DWORD         dwError;
106 	ULONG_PTR     reserved;
107 	ULONG_PTR     reserved2;
108 }
109 alias RASPBDLGW* LPRASPBDLGW;
110 
111 struct RASNOUSERA
112 {
113 	DWORD           dwSize = RASNOUSERA.sizeof;
114 	DWORD           dwFlags;
115 	DWORD           dwTimeoutMs;
116 	CHAR[UNLEN + 1] szUserName;
117 	CHAR[PWLEN + 1] szPassword;
118 	CHAR[DNLEN + 1] szDomain;
119 }
120 alias RASNOUSERA* LPRASNOUSERA;
121 
122 struct RASNOUSERW {
123 	DWORD            dwSize = RASNOUSERW.sizeof;
124 	DWORD            dwFlags;
125 	DWORD            dwTimeoutMs;
126 	WCHAR[UNLEN + 1] szUserName;
127 	WCHAR[PWLEN + 1] szPassword;
128 	WCHAR[DNLEN + 1] szDomain;
129 }
130 alias RASNOUSERW* LPRASNOUSERW;
131 
132 extern (Windows) {
133 	BOOL RasDialDlgA(LPSTR, LPSTR, LPSTR, LPRASDIALDLG);
134 	BOOL RasDialDlgW(LPWSTR, LPWSTR, LPWSTR, LPRASDIALDLG);
135 	BOOL RasEntryDlgA(LPSTR, LPSTR, LPRASENTRYDLGA);
136 	BOOL RasEntryDlgW(LPWSTR, LPWSTR, LPRASENTRYDLGW);
137 	BOOL RasPhonebookDlgA(LPSTR, LPSTR, LPRASPBDLGA);
138 	BOOL RasPhonebookDlgW(LPWSTR, LPWSTR, LPRASPBDLGW);
139 }
140 
141 version (Unicode) {
142 	alias RASENTRYDLGW RASENTRYDLG;
143 	alias RASPBDLGW RASPBDLG;
144 	alias RASNOUSERW RASNOUSER;
145 	alias RasDialDlgW RasDialDlg;
146 	alias RasEntryDlgW RasEntryDlg;
147 	alias RasPhonebookDlgW RasPhonebookDlg;
148 } else {
149 	alias RASENTRYDLGA RASENTRYDLG;
150 	alias RASPBDLGA RASPBDLG;
151 	alias RASNOUSERA RASNOUSER;
152 	alias RasDialDlgA RasDialDlg;
153 	alias RasEntryDlgA RasEntryDlg;
154 	alias RasPhonebookDlgA RasPhonebookDlg;
155 }
156 
157 alias RASENTRYDLG* LPRASENTRYDLG;
158 alias RASPBDLG* LPRASPBDLG;
159 alias RASNOUSER* LPRASNOUSER;