Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

318 lines
7.3 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. rasdlg.h
  5. Abstract:
  6. Remote Access Common Dialog APIs
  7. These APIs live in RASDLG.DLL.
  8. The APIs in this header are added in Windows NT SUR and are not available
  9. in prior Windows NT or Windows 95 releases.
  10. --*/
  11. #ifndef _RASDLG_H_
  12. #define _RASDLG_H_
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif
  16. #include <pshpack4.h>
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. #include <ras.h>
  21. /* RasPhonebookDlg API callback.
  22. */
  23. typedef VOID (WINAPI* RASPBDLGFUNCW)( ULONG_PTR, DWORD, LPWSTR, LPVOID );
  24. typedef VOID (WINAPI* RASPBDLGFUNCA)( ULONG_PTR, DWORD, LPSTR, LPVOID );
  25. #define RASPBDEVENT_AddEntry 1
  26. #define RASPBDEVENT_EditEntry 2
  27. #define RASPBDEVENT_RemoveEntry 3
  28. #define RASPBDEVENT_DialEntry 4
  29. #define RASPBDEVENT_EditGlobals 5
  30. #define RASPBDEVENT_NoUser 6
  31. #define RASPBDEVENT_NoUserEdit 7
  32. #define RASNOUSER_SmartCard 0x00000001
  33. /* Defines the information passed in the 4th argument of RASPBDLGFUNC on
  34. ** "NoUser" and "NoUserEdit" events. Usage shown is for "NoUser". For
  35. ** "NoUserEdit", the timeout is ignored and the three strings are INs.
  36. */
  37. #define RASNOUSERW struct tagRASNOUSERW
  38. RASNOUSERW
  39. {
  40. IN DWORD dwSize;
  41. IN DWORD dwFlags;
  42. OUT DWORD dwTimeoutMs;
  43. OUT WCHAR szUserName[ UNLEN + 1 ];
  44. OUT WCHAR szPassword[ PWLEN + 1 ];
  45. OUT WCHAR szDomain[ DNLEN + 1 ];
  46. };
  47. #define RASNOUSERA struct tagRASNOUSERA
  48. RASNOUSERA
  49. {
  50. IN DWORD dwSize;
  51. IN DWORD dwFlags;
  52. OUT DWORD dwTimeoutMs;
  53. OUT CHAR szUserName[ UNLEN + 1 ];
  54. OUT CHAR szPassword[ PWLEN + 1 ];
  55. OUT CHAR szDomain[ DNLEN + 1 ];
  56. };
  57. #ifdef UNICODE
  58. #define RASNOUSER RASNOUSERW
  59. #else
  60. #define RASNOUSER RASNOUSERA
  61. #endif
  62. #define LPRASNOUSERW RASNOUSERW*
  63. #define LPRASNOUSERA RASNOUSERA*
  64. #define LPRASNOUSER RASNOUSER*
  65. /* RasPhonebookDlg API parameters.
  66. */
  67. #define RASPBDFLAG_PositionDlg 0x00000001
  68. #define RASPBDFLAG_ForceCloseOnDial 0x00000002
  69. #define RASPBDFLAG_NoUser 0x00000010
  70. #define RASPBDFLAG_UpdateDefaults 0x80000000
  71. #define RASPBDLGW struct tagRASPBDLGW
  72. RASPBDLGW
  73. {
  74. IN DWORD dwSize;
  75. IN HWND hwndOwner;
  76. IN DWORD dwFlags;
  77. IN LONG xDlg;
  78. IN LONG yDlg;
  79. IN ULONG_PTR dwCallbackId;
  80. IN RASPBDLGFUNCW pCallback;
  81. OUT DWORD dwError;
  82. IN ULONG_PTR reserved;
  83. IN ULONG_PTR reserved2;
  84. };
  85. #define RASPBDLGA struct tagRASPBDLGA
  86. RASPBDLGA
  87. {
  88. IN DWORD dwSize;
  89. IN HWND hwndOwner;
  90. IN DWORD dwFlags;
  91. IN LONG xDlg;
  92. IN LONG yDlg;
  93. IN ULONG_PTR dwCallbackId;
  94. IN RASPBDLGFUNCA pCallback;
  95. OUT DWORD dwError;
  96. IN ULONG_PTR reserved;
  97. IN ULONG_PTR reserved2;
  98. };
  99. #ifdef UNICODE
  100. #define RASPBDLG RASPBDLGW
  101. #define RASPBDLGFUNC RASPBDLGFUNCW
  102. #else
  103. #define RASPBDLG RASPBDLGA
  104. #define RASPBDLGFUNC RASPBDLGFUNCA
  105. #endif
  106. #define LPRASPBDLGW RASPBDLGW*
  107. #define LPRASPBDLGA RASPBDLGA*
  108. #define LPRASPBDLG RASPBDLG*
  109. /* RasEntryDlg API parameters.
  110. */
  111. #define RASEDFLAG_PositionDlg 0x00000001
  112. #define RASEDFLAG_NewEntry 0x00000002
  113. #define RASEDFLAG_CloneEntry 0x00000004
  114. #define RASEDFLAG_NoRename 0x00000008
  115. #define RASEDFLAG_ShellOwned 0x40000000
  116. #define RASEDFLAG_NewPhoneEntry 0x00000010
  117. #define RASEDFLAG_NewTunnelEntry 0x00000020
  118. #define RASEDFLAG_NewDirectEntry 0x00000040
  119. #define RASEDFLAG_NewBroadbandEntry 0x00000080
  120. #define RASEDFLAG_InternetEntry 0x00000100
  121. #define RASENTRYDLGW struct tagRASENTRYDLGW
  122. RASENTRYDLGW
  123. {
  124. IN DWORD dwSize;
  125. IN HWND hwndOwner;
  126. IN DWORD dwFlags;
  127. IN LONG xDlg;
  128. IN LONG yDlg;
  129. OUT WCHAR szEntry[ RAS_MaxEntryName + 1 ];
  130. OUT DWORD dwError;
  131. IN ULONG_PTR reserved;
  132. IN ULONG_PTR reserved2;
  133. };
  134. #define RASENTRYDLGA struct tagRASENTRYDLGA
  135. RASENTRYDLGA
  136. {
  137. IN DWORD dwSize;
  138. IN HWND hwndOwner;
  139. IN DWORD dwFlags;
  140. IN LONG xDlg;
  141. IN LONG yDlg;
  142. OUT CHAR szEntry[ RAS_MaxEntryName + 1 ];
  143. OUT DWORD dwError;
  144. IN ULONG_PTR reserved;
  145. IN ULONG_PTR reserved2;
  146. };
  147. #ifdef UNICODE
  148. #define RASENTRYDLG RASENTRYDLGW
  149. #else
  150. #define RASENTRYDLG RASENTRYDLGA
  151. #endif
  152. #define LPRASENTRYDLGW RASENTRYDLGW*
  153. #define LPRASENTRYDLGA RASENTRYDLGA*
  154. #define LPRASENTRYDLG RASENTRYDLG*
  155. /* RasDialDlg API parameters.
  156. */
  157. #define RASDDFLAG_PositionDlg 0x00000001
  158. #define RASDDFLAG_NoPrompt 0x00000002
  159. #define RASDDFLAG_LinkFailure 0x80000000
  160. #define RASDIALDLG struct tagRASDIALDLG
  161. RASDIALDLG
  162. {
  163. IN DWORD dwSize;
  164. IN HWND hwndOwner;
  165. IN DWORD dwFlags;
  166. IN LONG xDlg;
  167. IN LONG yDlg;
  168. IN DWORD dwSubEntry;
  169. OUT DWORD dwError;
  170. IN ULONG_PTR reserved;
  171. IN ULONG_PTR reserved2;
  172. };
  173. #define LPRASDIALDLG RASDIALDLG*
  174. /* RasMonitorDlg API parameters.
  175. */
  176. #if (WINVER <= 0x500)
  177. #define RASMDPAGE_Status 0
  178. #define RASMDPAGE_Summary 1
  179. #define RASMDPAGE_Preferences 2
  180. #define RASMDFLAG_PositionDlg 0x00000001
  181. #define RASMDFLAG_UpdateDefaults 0x80000000
  182. #define RASMONITORDLG struct tagRASMONITORDLG
  183. RASMONITORDLG
  184. {
  185. IN DWORD dwSize;
  186. IN HWND hwndOwner;
  187. IN DWORD dwFlags;
  188. IN DWORD dwStartPage;
  189. IN LONG xDlg;
  190. IN LONG yDlg;
  191. OUT DWORD dwError;
  192. IN ULONG_PTR reserved;
  193. IN ULONG_PTR reserved2;
  194. };
  195. #define LPRASMONITORDLG RASMONITORDLG*
  196. #endif
  197. #if (WINVER >= 0x500)
  198. typedef BOOL (WINAPI *RasCustomDialDlgFn) (
  199. HINSTANCE hInstDll,
  200. DWORD dwFlags,
  201. LPTSTR lpszPhonebook,
  202. LPTSTR lpszEntry,
  203. LPTSTR lpszPhoneNumber,
  204. LPRASDIALDLG lpInfo,
  205. PVOID pvInfo
  206. );
  207. typedef BOOL (WINAPI *RasCustomEntryDlgFn) (
  208. HINSTANCE hInstDll,
  209. LPTSTR lpszPhonebook,
  210. LPTSTR lpszEntry,
  211. LPRASENTRYDLG lpInfo,
  212. DWORD dwFlags
  213. );
  214. #endif
  215. /* RAS common dialog API prototypes.
  216. */
  217. BOOL APIENTRY RasPhonebookDlgA(
  218. LPSTR lpszPhonebook, LPSTR lpszEntry, LPRASPBDLGA lpInfo );
  219. BOOL APIENTRY RasPhonebookDlgW(
  220. LPWSTR lpszPhonebook, LPWSTR lpszEntry, LPRASPBDLGW lpInfo );
  221. BOOL APIENTRY RasEntryDlgA(
  222. LPSTR lpszPhonebook, LPSTR lpszEntry, LPRASENTRYDLGA lpInfo );
  223. BOOL APIENTRY RasEntryDlgW(
  224. LPWSTR lpszPhonebook, LPWSTR lpszEntry, LPRASENTRYDLGW lpInfo );
  225. BOOL APIENTRY RasDialDlgA(
  226. LPSTR lpszPhonebook, LPSTR lpszEntry, LPSTR lpszPhoneNumber,
  227. LPRASDIALDLG lpInfo );
  228. BOOL APIENTRY RasDialDlgW(
  229. LPWSTR lpszPhonebook, LPWSTR lpszEntry, LPWSTR lpszPhoneNumber,
  230. LPRASDIALDLG lpInfo );
  231. #if (WINVER <= 0x500)
  232. BOOL APIENTRY RasMonitorDlgA(
  233. LPSTR lpszDeviceName, LPRASMONITORDLG lpInfo );
  234. BOOL APIENTRY RasMonitorDlgW(
  235. LPWSTR lpszDeviceName, LPRASMONITORDLG lpInfo );
  236. #endif
  237. #ifdef UNICODE
  238. #define RasPhonebookDlg RasPhonebookDlgW
  239. #define RasEntryDlg RasEntryDlgW
  240. #define RasDialDlg RasDialDlgW
  241. #if (WINVER <= 0x500)
  242. #define RasMonitorDlg RasMonitorDlgW
  243. #endif
  244. #else
  245. #define RasPhonebookDlg RasPhonebookDlgA
  246. #define RasEntryDlg RasEntryDlgA
  247. #define RasDialDlg RasDialDlgA
  248. #if (WINVER <= 0x500)
  249. #define RasMonitorDlg RasMonitorDlgA
  250. #endif
  251. #endif
  252. #ifdef __cplusplus
  253. }
  254. #endif
  255. #include <poppack.h>
  256. #endif // _RASDLG_H_