OSDN Git Service

070eff383bd8ae1d774174bc0694e28ace59ad51
[mingw/mingw-org-wsl.git] / include / rasdlg.h
1 /**
2  * @file rasdlg.h
3  * @copy 2012 MinGW.org project
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  * 
12  * The above copyright notice and this permission notice (including the next
13  * paragraph) shall be included in all copies or substantial portions of the
14  * Software.
15  * 
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 #ifndef _RASDLG_H
25 #define _RASDLG_H
26 #pragma GCC system_header
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 #include <ras.h>
33
34 #define RASPBDEVENT_AddEntry    1
35 #define RASPBDEVENT_EditEntry   2
36 #define RASPBDEVENT_RemoveEntry 3
37 #define RASPBDEVENT_DialEntry   4
38 #define RASPBDEVENT_EditGlobals 5
39 #define RASPBDEVENT_NoUser      6
40 #define RASPBDEVENT_NoUserEdit  7
41  
42 #define RASPBDFLAG_PositionDlg  1
43 #define RASPBDFLAG_ForceCloseOnDial     2
44 #define RASPBDFLAG_NoUser       16
45
46 #define RASEDFLAG_PositionDlg   1
47 #define RASEDFLAG_NewEntry      2
48 #define RASEDFLAG_CloneEntry    4
49
50 #define RASDDFLAG_PositionDlg   1
51
52 #ifndef RC_INVOKED
53 #include <pshpack4.h>
54
55 typedef struct tagRASENTRYDLGA
56 {
57         DWORD dwSize;
58         HWND  hwndOwner;
59         DWORD dwFlags;
60         LONG  xDlg;
61         LONG  yDlg;
62         CHAR  szEntry[RAS_MaxEntryName + 1];
63         DWORD dwError;
64         ULONG_PTR reserved;
65         ULONG_PTR reserved2;
66 } RASENTRYDLGA, *LPRASENTRYDLGA;
67 typedef struct tagRASENTRYDLGW
68 {
69         DWORD dwSize;
70         HWND  hwndOwner;
71         DWORD dwFlags;
72         LONG  xDlg;
73         LONG  yDlg;
74         WCHAR szEntry[RAS_MaxEntryName + 1];
75         DWORD dwError;
76         ULONG_PTR reserved;
77         ULONG_PTR reserved2;
78 } RASENTRYDLGW, *LPRASENTRYDLGW;
79
80 typedef struct tagRASDIALDLG
81 {
82         DWORD dwSize;
83         HWND  hwndOwner;
84         DWORD dwFlags;
85         LONG  xDlg;
86         LONG  yDlg;
87         DWORD dwSubEntry;
88         DWORD dwError;
89         ULONG_PTR reserved;
90         ULONG_PTR reserved2;
91 } RASDIALDLG, *LPRASDIALDLG;
92
93 /* Application-defined callback functions */
94 typedef VOID (WINAPI* RASPBDLGFUNCW)(DWORD, DWORD, LPWSTR, LPVOID);
95 typedef VOID (WINAPI* RASPBDLGFUNCA)(DWORD, DWORD, LPSTR, LPVOID);
96
97 typedef struct tagRASPBDLGA
98 {
99         DWORD         dwSize;
100         HWND          hwndOwner;
101         DWORD         dwFlags;
102         LONG          xDlg;
103         LONG          yDlg;
104         ULONG_PTR     dwCallbackId;
105         RASPBDLGFUNCA pCallback;
106         DWORD         dwError;
107         ULONG_PTR     reserved;
108         ULONG_PTR     reserved2;
109 } RASPBDLGA, *LPRASPBDLGA;
110 typedef struct tagRASPBDLGW
111 {
112         DWORD         dwSize;
113         HWND          hwndOwner;
114         DWORD         dwFlags;
115         LONG          xDlg;
116         LONG          yDlg;
117         ULONG_PTR     dwCallbackId;
118         RASPBDLGFUNCW pCallback;
119         DWORD         dwError;
120         ULONG_PTR     reserved;
121         ULONG_PTR     reserved2;
122 } RASPBDLGW, *LPRASPBDLGW;
123
124 typedef struct tagRASNOUSERA
125 {
126         DWORD dwSize;
127         DWORD dwFlags;
128         DWORD dwTimeoutMs;
129         CHAR  szUserName[UNLEN + 1];
130         CHAR  szPassword[PWLEN + 1];
131         CHAR  szDomain[DNLEN + 1];
132 } RASNOUSERA, *LPRASNOUSERA;
133 typedef struct tagRASNOUSERW
134 {
135         DWORD dwSize;
136         DWORD dwFlags;
137         DWORD dwTimeoutMs;
138         WCHAR szUserName[UNLEN + 1];
139         WCHAR szPassword[PWLEN + 1];
140         WCHAR szDomain[DNLEN + 1];
141 } RASNOUSERW, *LPRASNOUSERW ;
142
143 #include <poppack.h>
144
145 BOOL APIENTRY RasDialDlgA(LPSTR,LPSTR,LPSTR,LPRASDIALDLG);
146 BOOL APIENTRY RasDialDlgW(LPWSTR,LPWSTR,LPWSTR,LPRASDIALDLG);
147 BOOL APIENTRY RasEntryDlgA(LPSTR,LPSTR,LPRASENTRYDLGA);
148 BOOL APIENTRY RasEntryDlgW(LPWSTR,LPWSTR,LPRASENTRYDLGW);
149 BOOL APIENTRY RasPhonebookDlgA(LPSTR,LPSTR,LPRASPBDLGA);
150 BOOL APIENTRY RasPhonebookDlgW(LPWSTR,LPWSTR,LPRASPBDLGW);
151
152 #ifdef UNICODE
153 typedef RASENTRYDLGW    RASENTRYDLG, *LPRASENTRYDLG;
154 typedef RASPBDLGW       RASPBDLG, *LPRASPBDLG;
155 typedef RASNOUSERW      RASNOUSER, *LPRASNOUSER;
156 #define RasDialDlg      RasDialDlgW
157 #define RasEntryDlg     RasEntryDlgW
158 #define RasPhonebookDlg RasPhonebookDlgW
159 #else
160 typedef RASENTRYDLGA    RASENTRYDLG, *LPRASENTRYDLG;
161 typedef RASPBDLGA       RASPBDLG, *LPRASPBDLG;
162 typedef RASNOUSERA      RASNOUSER, *LPRASNOUSER;
163 #define RasDialDlg      RasDialDlgA
164 #define RasEntryDlg     RasEntryDlgA
165 #define RasPhonebookDlg RasPhonebookDlgA
166 #endif /* UNICODE */
167
168 #endif /* RC_INVOKED */
169
170 #ifdef __cplusplus
171 }
172 #endif
173 #endif