The OpenD Programming Language

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