home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 May / PCFMay2001.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / rasdlg.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  7.5 KB  |  304 lines

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