Leaked source code of windows server 2003
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.

326 lines
10 KiB

  1. /* Copyright (c) 1992-1996, Microsoft Corporation, all rights reserved
  2. **
  3. ** ras.h
  4. ** Remote Access external API
  5. ** Public header for external API clients
  6. **
  7. ** WINVER values in this file:
  8. ** WINVER < 0x400 = Windows NT 3.5, Windows NT 3.51
  9. ** WINVER = 0x400 = Windows 95, Windows NT SUR (default)
  10. ** WINVER > 0x400 = Windows NT SUR enhancements
  11. */
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #ifndef UNLEN
  16. #include <lmcons.h>
  17. #endif
  18. #include <pshpack4.h>
  19. /* Flags for RasConnectionNotification().
  20. */
  21. #define RASCN_Connection 0x00000001
  22. #define RASCN_Disconnection 0x00000002
  23. #define RASCN_BandwidthAdded 0x00000004
  24. #define RASCN_BandwidthRemoved 0x00000008
  25. /* RASENTRY 'dwDialMode' values.
  26. */
  27. #define RASEDM_DialAll 1
  28. #define RASEDM_DialAsNeeded 2
  29. /* RASENTRY 'dwIdleDisconnectSeconds' constants.
  30. */
  31. #define RASIDS_Disabled 0xffffffff
  32. #define RASIDS_UseGlobalValue 0
  33. /* AutoDial DLL function parameter block.
  34. */
  35. #define RASADPARAMS struct tagRASADPARAMS
  36. RASADPARAMS
  37. {
  38. DWORD dwSize;
  39. HWND hwndOwner;
  40. DWORD dwFlags;
  41. LONG xDlg;
  42. LONG yDlg;
  43. };
  44. #define LPRASADPARAMS RASADPARAMS*
  45. /* AutoDial DLL function parameter block 'dwFlags.'
  46. */
  47. #define RASADFLG_PositionDlg 0x00000001
  48. /* Prototype AutoDial DLL function.
  49. */
  50. typedef BOOL (WINAPI *RASADFUNCA)( LPSTR, LPSTR, LPRASADPARAMS, LPDWORD );
  51. typedef BOOL (WINAPI *RASADFUNCW)( LPWSTR, LPWSTR, LPRASADPARAMS, LPDWORD );
  52. #ifdef UNICODE
  53. #define RASADFUNC RASADFUNCW
  54. #else
  55. #define RASADFUNC RASADFUNCA
  56. #endif
  57. /* A RAS phone book multilinked sub-entry.
  58. */
  59. #define RASSUBENTRYA struct tagRASSUBENTRYA
  60. RASSUBENTRYA
  61. {
  62. DWORD dwSize;
  63. DWORD dwfFlags;
  64. //
  65. // Device
  66. //
  67. CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  68. CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  69. //
  70. // Phone numbers
  71. //
  72. CHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  73. DWORD dwAlternateOffset;
  74. };
  75. #define RASSUBENTRYW struct tagRASSUBENTRYW
  76. RASSUBENTRYW
  77. {
  78. DWORD dwSize;
  79. DWORD dwfFlags;
  80. //
  81. // Device
  82. //
  83. WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  84. WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  85. //
  86. // Phone numbers
  87. //
  88. WCHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  89. DWORD dwAlternateOffset;
  90. };
  91. #ifdef UNICODE
  92. #define RASSUBENTRY RASSUBENTRYW
  93. #else
  94. #define RASSUBENTRY RASSUBENTRYA
  95. #endif
  96. #define LPRASSUBENTRYW RASSUBENTRYW*
  97. #define LPRASSUBENTRYA RASSUBENTRYA*
  98. #define LPRASSUBENTRY RASSUBENTRY*
  99. /* Ras{Get,Set}Credentials structure. These calls
  100. ** supercede Ras{Get,Set}EntryDialParams.
  101. */
  102. #define RASCREDENTIALSA struct tagRASCREDENTIALSA
  103. RASCREDENTIALSA
  104. {
  105. DWORD dwSize;
  106. DWORD dwMask;
  107. CHAR szUserName[ UNLEN + 1 ];
  108. CHAR szPassword[ PWLEN + 1 ];
  109. CHAR szDomain[ DNLEN + 1 ];
  110. };
  111. #define RASCREDENTIALSW struct tagRASCREDENTIALSW
  112. RASCREDENTIALSW
  113. {
  114. DWORD dwSize;
  115. DWORD dwMask;
  116. WCHAR szUserName[ UNLEN + 1 ];
  117. WCHAR szPassword[ PWLEN + 1 ];
  118. WCHAR szDomain[ DNLEN + 1 ];
  119. };
  120. #ifdef UNICODE
  121. #define RASCREDENTIALS RASCREDENTIALSW
  122. #else
  123. #define RASCREDENTIALS RASCREDENTIALSA
  124. #endif
  125. #define LPRASCREDENTIALSW RASCREDENTIALSW*
  126. #define LPRASCREDENTIALSA RASCREDENTIALSA*
  127. #define LPRASCREDENTIALS RASCREDENTIALS*
  128. /* RASCREDENTIALS 'dwMask' values.
  129. */
  130. #define RASCM_UserName 0x00000001
  131. #define RASCM_Password 0x00000002
  132. #define RASCM_Domain 0x00000004
  133. /* AutoDial address properties.
  134. */
  135. #define RASAUTODIALENTRYA struct tagRASAUTODIALENTRYA
  136. RASAUTODIALENTRYA
  137. {
  138. DWORD dwSize;
  139. DWORD dwFlags;
  140. DWORD dwDialingLocation;
  141. CHAR szEntry[ RAS_MaxEntryName + 1];
  142. };
  143. #define RASAUTODIALENTRYW struct tagRASAUTODIALENTRYW
  144. RASAUTODIALENTRYW
  145. {
  146. DWORD dwSize;
  147. DWORD dwFlags;
  148. DWORD dwDialingLocation;
  149. WCHAR szEntry[ RAS_MaxEntryName + 1];
  150. };
  151. #ifdef UNICODE
  152. #define RASAUTODIALENTRY RASAUTODIALENTRYW
  153. #else
  154. #define RASAUTODIALENTRY RASAUTODIALENTRYA
  155. #endif
  156. #define LPRASAUTODIALENTRYW RASAUTODIALENTRYW*
  157. #define LPRASAUTODIALENTRYA RASAUTODIALENTRYA*
  158. #define LPRASAUTODIALENTRY RASAUTODIALENTRY*
  159. /* AutoDial control parameter values for
  160. ** Ras{Get,Set}AutodialParam.
  161. */
  162. #define RASADP_DisableConnectionQuery 0
  163. #define RASADP_LoginSessionDisable 1
  164. #define RASADP_SavedAddressesLimit 2
  165. #define RASADP_FailedConnectionTimeout 3
  166. #define RASADP_ConnectionQueryTimeout 4
  167. DWORD APIENTRY RasGetSubEntryHandleA( HRASCONN, DWORD, LPHRASCONN );
  168. DWORD APIENTRY RasGetSubEntryHandleW( HRASCONN, DWORD, LPHRASCONN );
  169. DWORD APIENTRY RasGetCredentialsA( LPSTR, LPSTR, LPRASCREDENTIALSA);
  170. DWORD APIENTRY RasGetCredentialsW( LPWSTR, LPWSTR, LPRASCREDENTIALSW );
  171. DWORD APIENTRY RasSetCredentialsA( LPSTR, LPSTR, LPRASCREDENTIALSA, BOOL );
  172. DWORD APIENTRY RasSetCredentialsW( LPWSTR, LPWSTR, LPRASCREDENTIALSW, BOOL );
  173. DWORD APIENTRY RasConnectionNotificationA( HRASCONN, HANDLE, DWORD );
  174. DWORD APIENTRY RasConnectionNotificationW( HRASCONN, HANDLE, DWORD );
  175. DWORD APIENTRY RasGetSubEntryPropertiesA( LPSTR, LPSTR, DWORD,
  176. LPRASSUBENTRYA, LPDWORD, LPBYTE, LPDWORD );
  177. DWORD APIENTRY RasGetSubEntryPropertiesW( LPWSTR, LPWSTR, DWORD,
  178. LPRASSUBENTRYW, LPDWORD, LPBYTE, LPDWORD );
  179. DWORD APIENTRY RasSetSubEntryPropertiesA( LPSTR, LPSTR, DWORD,
  180. LPRASSUBENTRYA, DWORD, LPBYTE, DWORD );
  181. DWORD APIENTRY RasSetSubEntryPropertiesW( LPWSTR, LPWSTR, DWORD,
  182. LPRASSUBENTRYW, DWORD, LPBYTE, DWORD );
  183. DWORD APIENTRY RasGetAutodialAddressA( LPSTR, LPDWORD, LPRASAUTODIALENTRYA,
  184. LPDWORD, LPDWORD );
  185. DWORD APIENTRY RasGetAutodialAddressW( LPWSTR, LPDWORD, LPRASAUTODIALENTRYW,
  186. LPDWORD, LPDWORD);
  187. DWORD APIENTRY RasSetAutodialAddressA( LPSTR, DWORD, LPRASAUTODIALENTRYA,
  188. DWORD, DWORD );
  189. DWORD APIENTRY RasSetAutodialAddressW( LPWSTR, DWORD, LPRASAUTODIALENTRYW,
  190. DWORD, DWORD );
  191. DWORD APIENTRY RasEnumAutodialAddressesA( LPSTR *, LPDWORD, LPDWORD );
  192. DWORD APIENTRY RasEnumAutodialAddressesW( LPWSTR *, LPDWORD, LPDWORD );
  193. DWORD APIENTRY RasGetAutodialEnableA( DWORD, LPBOOL );
  194. DWORD APIENTRY RasGetAutodialEnableW( DWORD, LPBOOL );
  195. DWORD APIENTRY RasSetAutodialEnableA( DWORD, BOOL );
  196. DWORD APIENTRY RasSetAutodialEnableW( DWORD, BOOL );
  197. DWORD APIENTRY RasGetAutodialParamA( DWORD, LPVOID, LPDWORD );
  198. DWORD APIENTRY RasGetAutodialParamW( DWORD, LPVOID, LPDWORD );
  199. DWORD APIENTRY RasSetAutodialParamA( DWORD, LPVOID, DWORD );
  200. DWORD APIENTRY RasSetAutodialParamW( DWORD, LPVOID, DWORD );
  201. #ifdef UNICODE
  202. #define RasDial RasDialW
  203. #define RasEnumConnections RasEnumConnectionsW
  204. #define RasEnumEntries RasEnumEntriesW
  205. #define RasGetConnectStatus RasGetConnectStatusW
  206. #define RasGetErrorString RasGetErrorStringW
  207. #define RasHangUp RasHangUpW
  208. #define RasGetProjectionInfo RasGetProjectionInfoW
  209. #define RasCreatePhonebookEntry RasCreatePhonebookEntryW
  210. #define RasEditPhonebookEntry RasEditPhonebookEntryW
  211. #define RasSetEntryDialParams RasSetEntryDialParamsW
  212. #define RasGetEntryDialParams RasGetEntryDialParamsW
  213. #define RasEnumDevices RasEnumDevicesW
  214. #define RasGetCountryInfo RasGetCountryInfoW
  215. #define RasGetEntryProperties RasGetEntryPropertiesW
  216. #define RasSetEntryProperties RasSetEntryPropertiesW
  217. #define RasRenameEntry RasRenameEntryW
  218. #define RasDeleteEntry RasDeleteEntryW
  219. #define RasValidateEntryName RasValidateEntryNameW
  220. #define RasGetSubEntryHandle RasGetSubEntryHandleW
  221. #define RasConnectionNotification RasConnectionNotificationW
  222. #define RasGetSubEntryProperties RasGetSubEntryPropertiesW
  223. #define RasSetSubEntryProperties RasSetSubEntryPropertiesW
  224. #define RasGetCredentials RasGetCredentialsW
  225. #define RasSetCredentials RasSetCredentialsW
  226. #define RasGetAutodialAddress RasGetAutodialAddressW
  227. #define RasSetAutodialAddress RasSetAutodialAddressW
  228. #define RasEnumAutodialAddresses RasEnumAutodialAddressesW
  229. #define RasGetAutodialEnable RasGetAutodialEnableW
  230. #define RasSetAutodialEnable RasSetAutodialEnableW
  231. #define RasGetAutodialParam RasGetAutodialParamW
  232. #define RasSetAutodialParam RasSetAutodialParamW
  233. #else
  234. #define RasDial RasDialA
  235. #define RasEnumConnections RasEnumConnectionsA
  236. #define RasEnumEntries RasEnumEntriesA
  237. #define RasGetConnectStatus RasGetConnectStatusA
  238. #define RasGetErrorString RasGetErrorStringA
  239. #define RasHangUp RasHangUpA
  240. #define RasGetProjectionInfo RasGetProjectionInfoA
  241. #define RasCreatePhonebookEntry RasCreatePhonebookEntryA
  242. #define RasEditPhonebookEntry RasEditPhonebookEntryA
  243. #define RasSetEntryDialParams RasSetEntryDialParamsA
  244. #define RasGetEntryDialParams RasGetEntryDialParamsA
  245. #define RasEnumDevices RasEnumDevicesA
  246. #define RasGetCountryInfo RasGetCountryInfoA
  247. #define RasGetEntryProperties RasGetEntryPropertiesA
  248. #define RasSetEntryProperties RasSetEntryPropertiesA
  249. #define RasRenameEntry RasRenameEntryA
  250. #define RasDeleteEntry RasDeleteEntryA
  251. #define RasValidateEntryName RasValidateEntryNameA
  252. #define RasGetSubEntryHandle RasGetSubEntryHandleA
  253. #define RasConnectionNotification RasConnectionNotificationA
  254. #define RasGetSubEntryProperties RasGetSubEntryPropertiesA
  255. #define RasSetSubEntryProperties RasSetSubEntryPropertiesA
  256. #define RasGetCredentials RasGetCredentialsA
  257. #define RasSetCredentials RasSetCredentialsA
  258. #define RasGetAutodialAddress RasGetAutodialAddressA
  259. #define RasSetAutodialAddress RasSetAutodialAddressA
  260. #define RasEnumAutodialAddresses RasEnumAutodialAddressesA
  261. #define RasGetAutodialEnable RasGetAutodialEnableA
  262. #define RasSetAutodialEnable RasSetAutodialEnableA
  263. #define RasGetAutodialParam RasGetAutodialParamA
  264. #define RasSetAutodialParam RasSetAutodialParamA
  265. #endif
  266. #ifdef __cplusplus
  267. }
  268. #endif
  269. #include <poppack.h>