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.

717 lines
27 KiB

  1. /* Copyright (c) 1996, Microsoft Corporation, all rights reserved
  2. **
  3. ** loaddlls.h
  4. ** RAS DLL load public header
  5. **
  6. ** 02/17/96 Steve Cobb
  7. */
  8. #ifndef _LOADDLLS_H_
  9. #define _LOADDLLS_H_
  10. #include <ras.h> // Win32 RAS APIs
  11. #include <rasdlg.h> // Win32 RAS UI APIs
  12. #include <rasman.h> // RAS connection manager service
  13. #include <rasppp.h> // PPP structure definitions
  14. #define RASMERGE
  15. /*----------------------------------------------------------------------------
  16. ** Datatypes and global declarations (defined in loaddlls.c)
  17. **----------------------------------------------------------------------------
  18. */
  19. /* RASAPI32.DLL entry points.
  20. */
  21. #ifndef RASMERGE
  22. extern HINSTANCE g_hRasapi32Dll;
  23. #endif
  24. typedef DWORD (APIENTRY * PRASCONNECTIONNOTIFICATION)( HRASCONN, HANDLE, DWORD );
  25. extern PRASCONNECTIONNOTIFICATION g_pRasConnectionNotification;
  26. typedef DWORD (APIENTRY * PRASDELETEENTRY)( LPTSTR, LPTSTR );
  27. extern PRASDELETEENTRY g_pRasDeleteEntry;
  28. typedef DWORD (APIENTRY * PRASDIAL)( LPRASDIALEXTENSIONS, LPTSTR, LPRASDIALPARAMS, DWORD, LPVOID, LPHRASCONN );
  29. extern PRASDIAL g_pRasDial;
  30. typedef DWORD (APIENTRY * PRASENUMENTRIES)( LPTSTR, LPTSTR, LPRASENTRYNAME, LPDWORD, LPDWORD );
  31. extern PRASENUMENTRIES g_pRasEnumEntries;
  32. typedef DWORD (APIENTRY * PRASENUMCONNECTIONS)( LPRASCONN, LPDWORD, LPDWORD );
  33. extern PRASENUMCONNECTIONS g_pRasEnumConnections;
  34. typedef DWORD (APIENTRY * PRASGETCONNECTSTATUS)( HRASCONN, LPRASCONNSTATUS );
  35. extern PRASGETCONNECTSTATUS g_pRasGetConnectStatus;
  36. typedef VOID (APIENTRY * PRASGETCONNECTRESPONSE)( HRASCONN, CHAR* );
  37. extern PRASGETCONNECTRESPONSE g_pRasGetConnectResponse;
  38. typedef DWORD (APIENTRY * PRASGETCREDENTIALS)( LPTSTR, LPTSTR, LPRASCREDENTIALS );
  39. extern PRASGETCREDENTIALS g_pRasGetCredentials;
  40. typedef DWORD (APIENTRY * PRASGETENTRYDIALPARAMS)( LPTSTR, LPRASDIALPARAMS, LPBOOL );
  41. extern PRASGETENTRYDIALPARAMS g_pRasGetEntryDialParams;
  42. typedef DWORD (APIENTRY * PRASGETERRORSTRING)( UINT, LPTSTR, DWORD );
  43. extern PRASGETERRORSTRING g_pRasGetErrorString;
  44. typedef DWORD (APIENTRY * PRASHANGUP)( HRASCONN );
  45. extern PRASHANGUP g_pRasHangUp;
  46. typedef DWORD (APIENTRY * PRASGETAUTODIALENABLE)( DWORD, LPBOOL );
  47. extern PRASGETAUTODIALENABLE g_pRasGetAutodialEnable;
  48. typedef DWORD (APIENTRY * PRASGETAUTODIALPARAM)( DWORD, LPVOID, LPDWORD );
  49. extern PRASGETAUTODIALPARAM g_pRasGetAutodialParam;
  50. typedef DWORD (APIENTRY * PRASGETPROJECTIONINFO)( HRASCONN, RASPROJECTION, LPVOID, LPDWORD );
  51. extern PRASGETPROJECTIONINFO g_pRasGetProjectionInfo;
  52. typedef DWORD (APIENTRY * PRASSETAUTODIALENABLE)( DWORD, BOOL );
  53. extern PRASSETAUTODIALENABLE g_pRasSetAutodialEnable;
  54. typedef DWORD (APIENTRY * PRASSETAUTODIALPARAM)( DWORD, LPVOID, DWORD );
  55. extern PRASSETAUTODIALPARAM g_pRasSetAutodialParam;
  56. typedef DWORD (APIENTRY * PRASGETSUBENTRYHANDLE)( HRASCONN, DWORD, LPHRASCONN );
  57. extern PRASGETSUBENTRYHANDLE g_pRasGetSubEntryHandle;
  58. typedef HPORT (APIENTRY * PRASGETHPORT)( HRASCONN );
  59. extern PRASGETHPORT g_pRasGetHport;
  60. typedef DWORD (APIENTRY * PRASSETCREDENTIALS)( LPTSTR, LPTSTR, LPRASCREDENTIALS, BOOL );
  61. extern PRASSETCREDENTIALS g_pRasSetCredentials;
  62. typedef DWORD (APIENTRY * PRASSETOLDPASSWORD)( HRASCONN, CHAR* );
  63. extern PRASSETOLDPASSWORD g_pRasSetOldPassword;
  64. typedef DWORD (APIENTRY * PRASGETCOUNTRYINFO)( LPRASCTRYINFO, LPDWORD );
  65. extern PRASGETCOUNTRYINFO g_pRasGetCountryInfo;
  66. typedef DWORD (APIENTRY * PRASINVOKEEAPUI)(HRASCONN, DWORD dwSubEntry, LPRASDIALEXTENSIONS, HWND );
  67. extern PRASINVOKEEAPUI g_pRasInvokeEapUI;
  68. typedef DWORD (APIENTRY * PRASSETEAPUSERDATA)( HANDLE, LPCTSTR, LPCTSTR, LPBYTE, LPDWORD );
  69. extern PRASSETEAPUSERDATA g_pRasSetEapUserData;
  70. typedef DWORD (APIENTRY * PRASGETENTRYPROPERTIES) (LPCTSTR, LPCTSTR, LPRASENTRY, LPDWORD, LPBYTE, LPDWORD);
  71. extern PRASGETENTRYPROPERTIES g_pRasGetEntryProperties;
  72. typedef DWORD (APIENTRY * PRASVALIDATEENTRYNAME) (LPCWSTR, LPCWSTR);
  73. extern PRASVALIDATEENTRYNAME g_pRasValidateEntryName;
  74. /* RASDLG.DLL entry points
  75. */
  76. #ifndef RASMERGE
  77. extern HINSTANCE g_hRasdlgDll;
  78. #endif
  79. typedef DWORD (APIENTRY * PRASPHONEBOOKDLG)( LPTSTR, LPTSTR, LPRASPBDLG );
  80. extern PRASPHONEBOOKDLG g_pRasPhonebookDlg;
  81. typedef DWORD (APIENTRY * PRASENTRYDLG)( LPTSTR, LPTSTR, LPRASENTRYDLG );
  82. extern PRASENTRYDLG g_pRasEntryDlg;
  83. typedef DWORD (APIENTRY * PROUTERENTRYDLG)( LPTSTR, LPTSTR, LPTSTR, LPRASENTRYDLG );
  84. extern PROUTERENTRYDLG g_pRouterEntryDlg;
  85. typedef DWORD (APIENTRY * PRASDIALDLG)( LPTSTR, LPTSTR, LPTSTR, LPRASDIALDLG );
  86. extern PRASDIALDLG g_pRasDialDlg;
  87. /* RASMAN.DLL entry points
  88. */
  89. #ifndef RASMERGE
  90. extern HINSTANCE g_hRasmanDll;
  91. #endif
  92. typedef DWORD (APIENTRY * PRASPORTCLEARSTATISTICS)( HANDLE, HPORT );
  93. extern PRASPORTCLEARSTATISTICS g_pRasPortClearStatistics;
  94. typedef DWORD (APIENTRY * PRASBUNDLECLEARSTATISTICS)( HANDLE, HPORT );
  95. extern PRASBUNDLECLEARSTATISTICS g_pRasBundleClearStatistics;
  96. typedef DWORD (APIENTRY * PRASBUNDLECLEARSTATISTICSEX)( HANDLE, HCONN );
  97. extern PRASBUNDLECLEARSTATISTICSEX g_pRasBundleClearStatisticsEx;
  98. typedef DWORD (APIENTRY * PRASDEVICEENUM)( HANDLE, PCHAR, PBYTE, PDWORD, PDWORD );
  99. extern PRASDEVICEENUM g_pRasDeviceEnum;
  100. typedef DWORD (APIENTRY * PRASDEVICEGETINFO)( HANDLE, HPORT, PCHAR, PCHAR, PBYTE, PDWORD );
  101. extern PRASDEVICEGETINFO g_pRasDeviceGetInfo;
  102. typedef DWORD (APIENTRY * PRASFREEBUFFER)( PBYTE );
  103. extern PRASFREEBUFFER g_pRasFreeBuffer;
  104. typedef DWORD (APIENTRY * PRASGETBUFFER)( PBYTE*, PDWORD );
  105. extern PRASGETBUFFER g_pRasGetBuffer;
  106. typedef DWORD (APIENTRY * PRASPORTGETFRAMINGEX)( HANDLE, HPORT, RAS_FRAMING_INFO* );
  107. extern PRASPORTGETFRAMINGEX g_pRasPortGetFramingEx;
  108. typedef DWORD (APIENTRY * PRASGETINFO)( HANDLE, HPORT, RASMAN_INFO* );
  109. extern PRASGETINFO g_pRasGetInfo;
  110. typedef DWORD (APIENTRY * PRASGETNDISWANDRIVERCAPS)( HANDLE, RAS_NDISWAN_DRIVER_INFO* );
  111. extern PRASGETNDISWANDRIVERCAPS g_pRasGetNdiswanDriverCaps;
  112. typedef DWORD (APIENTRY * PRASINITIALIZE)();
  113. extern PRASINITIALIZE g_pRasInitialize;
  114. typedef DWORD (APIENTRY * PRASINITIALIZENOWAIT)();
  115. extern PRASINITIALIZE g_pRasInitializeNoWait;
  116. typedef DWORD (APIENTRY * PRASPORTCANCELRECEIVE)( HPORT );
  117. extern PRASPORTCANCELRECEIVE g_pRasPortCancelReceive;
  118. typedef DWORD (APIENTRY * PRASPORTENUM)( HANDLE, PBYTE, PDWORD, PDWORD );
  119. extern PRASPORTENUM g_pRasPortEnum;
  120. typedef DWORD (APIENTRY * PRASPORTGETINFO)( HANDLE, HPORT, PBYTE, PDWORD );
  121. extern PRASPORTGETINFO g_pRasPortGetInfo;
  122. typedef DWORD (APIENTRY * PRASPORTGETSTATISTICS)( HANDLE, HPORT, PBYTE, PDWORD );
  123. extern PRASPORTGETSTATISTICS g_pRasPortGetStatistics;
  124. typedef DWORD (APIENTRY * PRASBUNDLEGETSTATISTICS)( HANDLE, HPORT, PBYTE, PDWORD );
  125. extern PRASBUNDLEGETSTATISTICS g_pRasBundleGetStatistics;
  126. typedef DWORD (APIENTRY * PRASPORTGETSTATISTICSEX)( HANDLE, HPORT, PBYTE, PDWORD );
  127. extern PRASPORTGETSTATISTICSEX g_pRasPortGetStatisticsEx;
  128. typedef DWORD (APIENTRY * PRASBUNDLEGETSTATISTICSEX)(HANDLE, HPORT, PBYTE, PDWORD);
  129. extern PRASBUNDLEGETSTATISTICSEX g_pRasBundleGetStatisticsEx;
  130. typedef DWORD (APIENTRY * PRASPORTRECEIVE)( HPORT, PBYTE, PDWORD, DWORD, HANDLE );
  131. extern PRASPORTRECEIVE g_pRasPortReceive;
  132. typedef DWORD (APIENTRY * PRASPORTRECEIVEEX ) ( HPORT, PBYTE, PDWORD );
  133. extern PRASPORTRECEIVEEX g_pRasPortReceiveEx;
  134. typedef DWORD (APIENTRY * PRASPORTSEND)( HPORT, PBYTE, DWORD );
  135. extern PRASPORTSEND g_pRasPortSend;
  136. typedef DWORD (APIENTRY * PRASPORTGETBUNDLE)(HANDLE, HPORT, HBUNDLE* );
  137. extern PRASPORTGETBUNDLE g_pRasPortGetBundle;
  138. typedef DWORD (APIENTRY * PRASGETDEVCONFIG)( HANDLE, HPORT, PCHAR, PBYTE, DWORD* );
  139. extern PRASGETDEVCONFIG g_pRasGetDevConfig;
  140. extern PRASGETDEVCONFIG g_pRasGetDevConfigEx;
  141. typedef DWORD (APIENTRY * PRASSETDEVCONFIG)(HPORT, PCHAR, PBYTE, DWORD );
  142. extern PRASSETDEVCONFIG g_pRasSetDevConfig;
  143. typedef DWORD (APIENTRY * PRASPORTOPEN)(PCHAR, HPORT*, HANDLE);
  144. extern PRASPORTOPEN g_pRasPortOpen;
  145. typedef DWORD (APIENTRY * PRASPORTREGISTERSLIP)(HPORT, DWORD, DWORD, BOOL,
  146. WCHAR*, WCHAR*, WCHAR*, WCHAR*);
  147. extern PRASPORTREGISTERSLIP g_pRasPortRegisterSlip;
  148. typedef DWORD (APIENTRY * PRASALLOCATEROUTE)(HPORT, RAS_PROTOCOLTYPE, BOOL,
  149. RASMAN_ROUTEINFO*);
  150. extern PRASALLOCATEROUTE g_pRasAllocateRoute;
  151. typedef DWORD (APIENTRY * PRASACTIVATEROUTE)(HPORT, RAS_PROTOCOLTYPE,
  152. RASMAN_ROUTEINFO*, PROTOCOL_CONFIG_INFO*);
  153. extern PRASACTIVATEROUTE g_pRasActivateRoute;
  154. typedef DWORD (APIENTRY * PRASACTIVATEROUTEEX)(HPORT, RAS_PROTOCOLTYPE, DWORD,
  155. RASMAN_ROUTEINFO*, PROTOCOL_CONFIG_INFO*);
  156. extern PRASACTIVATEROUTEEX g_pRasActivateRouteEx;
  157. typedef DWORD (APIENTRY * PRASDEVICESETINFO)(HPORT, PCHAR, PCHAR, RASMAN_DEVICEINFO*);
  158. extern PRASDEVICESETINFO g_pRasDeviceSetInfo;
  159. typedef DWORD (APIENTRY * PRASDEVICECONNECT)(HPORT, PCHAR, PCHAR, DWORD, HANDLE);
  160. extern PRASDEVICECONNECT g_pRasDeviceConnect;
  161. typedef DWORD (APIENTRY * PRASPORTSETINFO)(HPORT, RASMAN_PORTINFO*);
  162. extern PRASPORTSETINFO g_pRasPortSetInfo;
  163. typedef DWORD (APIENTRY * PRASPORTCLOSE)(HPORT);
  164. extern PRASPORTCLOSE g_pRasPortClose;
  165. typedef DWORD (APIENTRY * PRASPORTLISTEN)(HPORT, DWORD, HANDLE);
  166. extern PRASPORTLISTEN g_pRasPortListen;
  167. typedef DWORD (APIENTRY * PRASPORTCONNECTCOMPLETE)(HPORT);
  168. extern PRASPORTCONNECTCOMPLETE g_pRasPortConnectComplete;
  169. typedef DWORD (APIENTRY * PRASPORTDISCONNECT)(HPORT, HANDLE);
  170. extern PRASPORTDISCONNECT g_pRasPortDisconnect;
  171. typedef DWORD (APIENTRY * PRASREQUESTNOTIFICATION)(HPORT, HANDLE);
  172. extern PRASREQUESTNOTIFICATION g_pRasRequestNotification;
  173. typedef DWORD (APIENTRY * PRASPORTENUMPROTOCOLS)(HANDLE, HPORT, RAS_PROTOCOLS*, PDWORD);
  174. extern PRASPORTENUMPROTOCOLS g_pRasPortEnumProtocols;
  175. typedef DWORD (APIENTRY * PRASPORTSETFRAMING)(HPORT, RAS_FRAMING,
  176. RASMAN_PPPFEATURES*, RASMAN_PPPFEATURES*);
  177. extern PRASPORTSETFRAMING g_pRasPortSetFraming;
  178. typedef DWORD (APIENTRY * PRASPORTSETFRAMINGEX)(HPORT, RAS_FRAMING_INFO*);
  179. extern PRASPORTSETFRAMINGEX g_pRasPortSetFramingEx;
  180. typedef DWORD (APIENTRY * PRASSETCACHEDCREDENTIALS)(PCHAR, PCHAR, PCHAR);
  181. extern PRASSETCACHEDCREDENTIALS g_pRasSetCachedCredentials;
  182. typedef DWORD (APIENTRY * PRASGETDIALPARAMS)(DWORD, LPDWORD, PRAS_DIALPARAMS);
  183. extern PRASGETDIALPARAMS g_pRasGetDialParams;
  184. typedef DWORD (APIENTRY * PRASSETDIALPARAMS)(DWORD, DWORD, PRAS_DIALPARAMS, BOOL);
  185. extern PRASSETDIALPARAMS g_pRasSetDialParams;
  186. typedef DWORD (APIENTRY * PRASCREATECONNECTION) ( HCONN *, DWORD, DWORD *, DWORD *,
  187. DWORD, GUID *, CHAR *, CHAR *,CHAR *,
  188. CHAR *);
  189. extern PRASCREATECONNECTION g_pRasCreateConnection;
  190. typedef DWORD (APIENTRY * PRASDESTROYCONNECTION)(HCONN);
  191. extern PRASDESTROYCONNECTION g_pRasDestroyConnection;
  192. typedef DWORD (APIENTRY * PRASCONNECTIONENUM)(HANDLE, HCONN*, LPDWORD, LPDWORD);
  193. extern PRASCONNECTIONENUM g_pRasConnectionEnum;
  194. typedef DWORD (APIENTRY * PRASADDCONNECTIONPORT)(HCONN, HPORT, DWORD);
  195. extern PRASADDCONNECTIONPORT g_pRasAddConnectionPort;
  196. typedef DWORD (APIENTRY * PRASENUMCONNECTIONPORTS)(HANDLE, HCONN, RASMAN_PORT*,
  197. LPDWORD, LPDWORD);
  198. extern PRASENUMCONNECTIONPORTS g_pRasEnumConnectionPorts;
  199. typedef DWORD (APIENTRY * PRASGETCONNECTIONPARAMS)(HCONN, PRAS_CONNECTIONPARAMS);
  200. extern PRASGETCONNECTIONPARAMS g_pRasGetConnectionParams;
  201. typedef DWORD (APIENTRY * PRASSETCONNECTIONPARAMS)(HCONN, PRAS_CONNECTIONPARAMS);
  202. extern PRASSETCONNECTIONPARAMS g_pRasSetConnectionParams;
  203. typedef DWORD (APIENTRY * PRASGETCONNECTIONUSERDATA)(HCONN, DWORD, PBYTE, LPDWORD);
  204. extern PRASGETCONNECTIONUSERDATA g_pRasGetConnectionUserData;
  205. typedef DWORD (APIENTRY * PRASSETCONNECTIONUSERDATA)(HCONN, DWORD, PBYTE, DWORD);
  206. extern PRASSETCONNECTIONUSERDATA g_pRasSetConnectionUserData;
  207. typedef DWORD (APIENTRY * PRASGETPORTUSERDATA)(HCONN, DWORD, PBYTE, LPDWORD);
  208. extern PRASGETPORTUSERDATA g_pRasGetPortUserData;
  209. typedef DWORD (APIENTRY * PRASSETPORTUSERDATA)(HCONN, DWORD, PBYTE, DWORD);
  210. extern PRASSETPORTUSERDATA g_pRasSetPortUserData;
  211. typedef DWORD (APIENTRY * PRASADDNOTIFICATION)(HCONN, HANDLE, DWORD);
  212. extern PRASADDNOTIFICATION g_pRasAddNotification;
  213. typedef DWORD (APIENTRY * PRASSIGNALNEWCONNECTION)(HCONN);
  214. extern PRASSIGNALNEWCONNECTION g_pRasSignalNewConnection;
  215. typedef DWORD (APIENTRY * PRASPPPSTOP)(HPORT);
  216. extern PRASPPPSTOP g_pRasPppStop;
  217. typedef DWORD (APIENTRY * PRASPPPCALLBACK)(HPORT, CHAR*);
  218. extern PRASPPPCALLBACK g_pRasPppCallback;
  219. typedef DWORD (APIENTRY * PRASPPPCHANGEPASSWORD)(HPORT, CHAR*, CHAR*, CHAR*);
  220. extern PRASPPPCHANGEPASSWORD g_pRasPppChangePassword;
  221. typedef DWORD (APIENTRY * PRASPPPGETINFO)(HPORT, PPP_MESSAGE*);
  222. extern PRASPPPGETINFO g_pRasPppGetInfo;
  223. typedef DWORD (APIENTRY * PRASPPPRETRY)(HPORT, CHAR*, CHAR*, CHAR*);
  224. extern PRASPPPRETRY g_pRasPppRetry;
  225. typedef DWORD (APIENTRY *PRASPPPSTART)(HPORT, CHAR*, CHAR*, CHAR*, CHAR*, LUID*,
  226. PPP_CONFIG_INFO*, LPVOID, CHAR*,
  227. BOOL, HANDLE, DWORD, BOOL, PPP_BAPPARAMS*,
  228. BOOL, DWORD, DWORD);
  229. extern PRASPPPSTART g_pRasPppStart;
  230. typedef DWORD (APIENTRY * PRASSETIOCOMPLETIONPORT)(HPORT, HANDLE, PRAS_OVERLAPPED,
  231. PRAS_OVERLAPPED, PRAS_OVERLAPPED,
  232. PRAS_OVERLAPPED, HCONN);
  233. extern PRASSETIOCOMPLETIONPORT g_pRasSetIoCompletionPort;
  234. typedef DWORD (APIENTRY * PRASSENDPPPMESSAGETORASMAN) (PPP_MESSAGE *pPppMessage);
  235. extern PRASSENDPPPMESSAGETORASMAN g_pRasSendPppMessageToRasman;
  236. typedef DWORD (APIENTRY * PRASSETRASDIALINFO) (HPORT, CHAR*, CHAR*, CHAR *, DWORD, PBYTE);
  237. extern PRASSETRASDIALINFO g_pRasSetRasdialInfo;
  238. typedef DWORD (APIENTRY * PRASRPCCONNECT ) ( LPCTSTR, HANDLE * );
  239. extern PRASRPCCONNECT g_pRasRpcConnect;
  240. typedef DWORD (APIENTRY * PRASRPCDISCONNECT ) ( HANDLE * );
  241. extern PRASRPCDISCONNECT g_pRasRpcDisconnect;
  242. typedef DWORD (APIENTRY * PRASNUMPORTOPEN ) ();
  243. extern PRASNUMPORTOPEN g_pRasNumPortOpen;
  244. typedef DWORD (APIENTRY *PRASREFCONNECTION ) ( HCONN, BOOL, DWORD * );
  245. extern PRASREFCONNECTION g_pRasRefConnection;
  246. typedef DWORD (APIENTRY *PRASPPPGETEAPINFO) ( HCONN, DWORD, DWORD *, DWORD *,
  247. DWORD *, PBYTE);
  248. extern PRASPPPGETEAPINFO g_pRasPppGetEapInfo;
  249. typedef DWORD( APIENTRY *PRASPPPSETEAPINFO) (HPORT, DWORD, DWORD, PBYTE);
  250. extern PRASPPPSETEAPINFO g_pRasPppSetEapInfo;
  251. typedef DWORD(APIENTRY *PRASFINDPREREQUISITEENTRY) (HCONN, HCONN *);
  252. extern PRASFINDPREREQUISITEENTRY g_pRasFindPrerequisiteEntry;
  253. typedef DWORD(APIENTRY *PRASPORTOPENEX) (CHAR *, DWORD, HPORT *, HANDLE, DWORD *);
  254. extern PRASPORTOPENEX g_pRasPortOpenEx;
  255. typedef DWORD(APIENTRY *PRASLINKGETSTATISTICS) (HANDLE, HCONN, DWORD, PBYTE);
  256. extern PRASLINKGETSTATISTICS g_pRasLinkGetStatistics;
  257. typedef DWORD(APIENTRY *PRASCONNECTIONGETSTATISTICS) (HANDLE, HCONN, PBYTE);
  258. extern PRASCONNECTIONGETSTATISTICS g_pRasConnectionGetStatistics;
  259. typedef DWORD(APIENTRY *PRASGETHPORTFROMCONNECTION) (HANDLE, HCONN, HPORT *);
  260. extern PRASGETHPORTFROMCONNECTION g_pRasGetHportFromConnection;
  261. typedef DWORD(APIENTRY *PRASRPCBIND) (LPWSTR, HANDLE *, BOOL);
  262. extern PRASRPCBIND g_pRasRpcBind;
  263. typedef DWORD(APIENTRY *PRASREFERENCECUSTOMCOUNT) (HCONN ,BOOL, CHAR *, CHAR *, DWORD *);
  264. extern PRASREFERENCECUSTOMCOUNT g_pRasReferenceCustomCount;
  265. typedef DWORD(APIENTRY *PRASGETHCONNFROMENTRY) (HCONN *, CHAR *, CHAR *);
  266. extern PRASGETHCONNFROMENTRY g_pRasGetHConnFromEntry;
  267. typedef DWORD(APIENTRY *PRASGETDEVICENAME) (RASDEVICETYPE, CHAR *);
  268. extern PRASGETDEVICENAME g_pRasGetDeviceName;
  269. typedef DWORD(APIENTRY *PRASENABLEIPSEC) (HPORT, BOOL, BOOL, RAS_L2TP_ENCRYPTION);
  270. extern PRASENABLEIPSEC g_pRasEnableIpSec;
  271. typedef DWORD(APIENTRY *PRASISIPSECENABLED) (HPORT, BOOL *);
  272. extern PRASISIPSECENABLED g_pRasIsIpSecEnabled;
  273. typedef DWORD(APIENTRY *PRASGETEAPUSERINFO) (HANDLE, PBYTE, DWORD *, GUID *, BOOL, DWORD);
  274. extern PRASGETEAPUSERINFO g_pRasGetEapUserInfo;
  275. typedef DWORD(APIENTRY *PRASSETEAPUSERINFO) (HANDLE, GUID *, PBYTE, DWORD, BOOL, BOOL, DWORD);
  276. extern PRASSETEAPUSERINFO g_pRasSetEapUserInfo;
  277. typedef DWORD(APIENTRY *PRASSETEAPLOGONINFO) (HPORT, BOOL, RASEAPINFO *);
  278. extern PRASSETEAPLOGONINFO g_pRasSetEapLogonInfo;
  279. typedef DWORD(APIENTRY *PRASSTARTRASAUTOIFREQUIRED) (VOID);
  280. extern PRASSTARTRASAUTOIFREQUIRED g_pRasStartRasAutoIfRequired;
  281. /* MPRAPI.DLL entry points
  282. */
  283. #ifndef RASMERGE
  284. extern HINSTANCE g_hMpradminDll;
  285. #endif
  286. typedef DWORD (APIENTRY * PMPRADMININTERFACECREATE)(HANDLE,DWORD,LPBYTE,HANDLE*);
  287. extern PMPRADMININTERFACECREATE g_pMprAdminInterfaceCreate;
  288. typedef DWORD (APIENTRY * PMPRADMININTERFACEDELETE)(HANDLE,HANDLE);
  289. extern PMPRADMININTERFACEDELETE g_pMprAdminInterfaceDelete;
  290. typedef DWORD (APIENTRY * PMPRADMININTERFACEGETHANDLE)(HANDLE,LPWSTR,HANDLE*,BOOL);
  291. extern PMPRADMININTERFACEGETHANDLE g_pMprAdminInterfaceGetHandle;
  292. typedef DWORD (APIENTRY * PMPRADMININTERFACEGETCREDENTIALS)(LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR);
  293. extern PMPRADMININTERFACEGETCREDENTIALS g_pMprAdminInterfaceGetCredentials;
  294. typedef DWORD (APIENTRY * PMPRADMININTERFACEGETCREDENTIALSEX)(HANDLE,HANDLE,DWORD,LPBYTE *);
  295. extern PMPRADMININTERFACEGETCREDENTIALSEX g_pMprAdminInterfaceGetCredentialsEx;
  296. typedef DWORD (APIENTRY * PMPRADMININTERFACESETCREDENTIALS)(LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR);
  297. extern PMPRADMININTERFACESETCREDENTIALS g_pMprAdminInterfaceSetCredentials;
  298. typedef DWORD (APIENTRY * PMPRADMININTERFACESETCREDENTIALSEX)(HANDLE,HANDLE,DWORD,LPBYTE);
  299. extern PMPRADMININTERFACESETCREDENTIALSEX g_pMprAdminInterfaceSetCredentialsEx;
  300. typedef DWORD (APIENTRY * PMPRADMINBUFFERFREE)(LPVOID);
  301. extern PMPRADMINBUFFERFREE g_pMprAdminBufferFree;
  302. typedef DWORD (APIENTRY * PMPRADMININTERFACETRANSPORTADD)(HANDLE,HANDLE,DWORD,LPBYTE,DWORD);
  303. extern PMPRADMININTERFACETRANSPORTADD g_pMprAdminInterfaceTransportAdd;
  304. typedef DWORD (APIENTRY * PMPRADMININTERFACETRANSPORTSETINFO)(HANDLE,HANDLE,DWORD,LPBYTE,DWORD);
  305. extern PMPRADMININTERFACETRANSPORTSETINFO g_pMprAdminInterfaceTransportSetInfo;
  306. typedef DWORD (APIENTRY * PMPRADMINSERVERDISCONNECT)(HANDLE);
  307. extern PMPRADMINSERVERDISCONNECT g_pMprAdminServerDisconnect;
  308. typedef DWORD (APIENTRY * PMPRADMINSERVERCONNECT)(LPWSTR,HANDLE*);
  309. extern PMPRADMINSERVERCONNECT g_pMprAdminServerConnect;
  310. typedef DWORD (APIENTRY * PMPRADMINTRANSPORTSETINFO)(HANDLE,DWORD,LPBYTE,DWORD,LPBYTE,DWORD);
  311. extern PMPRADMINTRANSPORTSETINFO g_pMprAdminTransportSetInfo;
  312. typedef DWORD (APIENTRY * PRASADMINSERVERCONNECT)(LPWSTR, HANDLE*);
  313. extern PRASADMINSERVERCONNECT g_pRasAdminServerConnect;
  314. typedef DWORD (APIENTRY * PRASADMINSERVERDISCONNECT)(HANDLE);
  315. extern PRASADMINSERVERDISCONNECT g_pRasAdminServerDisconnect;
  316. typedef DWORD (APIENTRY * PRASADMINBUFFERFREE)(LPVOID);
  317. extern PRASADMINBUFFERFREE g_pRasAdminBufferFree;
  318. typedef DWORD (APIENTRY * PRASADMINCONNECTIONENUM)(HANDLE, DWORD, LPBYTE*, DWORD, LPDWORD, LPDWORD, LPDWORD);
  319. extern PRASADMINCONNECTIONENUM g_pRasAdminConnectionEnum;
  320. typedef DWORD (APIENTRY * PRASADMINCONNECTIONGETINFO)(HANDLE, DWORD, HANDLE, LPBYTE*);
  321. extern PRASADMINCONNECTIONGETINFO g_pRasAdminConnectionGetInfo;
  322. typedef DWORD (APIENTRY * PRASADMINPORTENUM)(HANDLE, DWORD, HANDLE, LPBYTE*, DWORD, LPDWORD, LPDWORD, LPDWORD);
  323. extern PRASADMINPORTENUM g_pRasAdminPortEnum;
  324. typedef DWORD (APIENTRY * PRASADMINPORTGETINFO)(HANDLE, DWORD, HANDLE, LPBYTE*);
  325. extern PRASADMINPORTGETINFO g_pRasAdminPortGetInfo;
  326. typedef DWORD (APIENTRY * PRASADMINPORTDISCONNECT)(HANDLE, HANDLE);
  327. extern PRASADMINPORTDISCONNECT g_pRasAdminPortDisconnect;
  328. typedef DWORD (APIENTRY * PRASADMINUSERSETINFO)(LPCWSTR,LPCWSTR,DWORD,LPBYTE);
  329. extern PRASADMINUSERSETINFO g_pRasAdminUserSetInfo;
  330. typedef DWORD (APIENTRY * PMPRADMINUSERSERVERCONNECT)(PWCHAR, BOOL, PHANDLE);
  331. extern PMPRADMINUSERSERVERCONNECT g_pMprAdminUserServerConnect;
  332. typedef DWORD (APIENTRY * PMPRADMINUSERSERVERDISCONNECT)(HANDLE);
  333. extern PMPRADMINUSERSERVERDISCONNECT g_pMprAdminUserServerDisconnect;
  334. typedef DWORD (APIENTRY * PMPRADMINUSEROPEN)(HANDLE, PWCHAR, PHANDLE);
  335. extern PMPRADMINUSEROPEN g_pMprAdminUserOpen;
  336. typedef DWORD (APIENTRY * PMPRADMINUSERCLOSE)(HANDLE);
  337. extern PMPRADMINUSERCLOSE g_pMprAdminUserClose;
  338. typedef DWORD (APIENTRY * PMPRADMINUSERWRITE)(HANDLE, DWORD, LPBYTE);
  339. extern PMPRADMINUSERWRITE g_pMprAdminUserWrite;
  340. typedef DWORD (APIENTRY * PMPRCONFIGBUFFERFREE)(LPVOID);
  341. extern PMPRCONFIGBUFFERFREE g_pMprConfigBufferFree;
  342. typedef DWORD (APIENTRY * PMPRCONFIGSERVERCONNECT)(LPWSTR,HANDLE*);
  343. extern PMPRCONFIGSERVERCONNECT g_pMprConfigServerConnect;
  344. typedef VOID (APIENTRY * PMPRCONFIGSERVERDISCONNECT)(HANDLE);
  345. extern PMPRCONFIGSERVERDISCONNECT g_pMprConfigServerDisconnect;
  346. typedef DWORD (APIENTRY * PMPRCONFIGTRANSPORTGETINFO)(HANDLE,HANDLE,LPBYTE*,LPDWORD,LPBYTE*,LPDWORD,LPWSTR*);
  347. extern PMPRCONFIGTRANSPORTGETINFO g_pMprConfigTransportGetInfo;
  348. typedef DWORD (APIENTRY * PMPRCONFIGTRANSPORTSETINFO)(HANDLE,HANDLE,LPBYTE,DWORD,LPBYTE,DWORD,LPWSTR);
  349. extern PMPRCONFIGTRANSPORTSETINFO g_pMprConfigTransportSetInfo;
  350. typedef DWORD (APIENTRY * PMPRCONFIGTRANSPORTGETHANDLE)(HANDLE,DWORD,HANDLE*);
  351. extern PMPRCONFIGTRANSPORTGETHANDLE g_pMprConfigTransportGetHandle;
  352. typedef DWORD (APIENTRY * PMPRCONFIGINTERFACECREATE)(HANDLE,DWORD,LPBYTE,HANDLE*);
  353. extern PMPRCONFIGINTERFACECREATE g_pMprConfigInterfaceCreate;
  354. typedef DWORD (APIENTRY * PMPRCONFIGINTERFACEDELETE)(HANDLE,HANDLE);
  355. extern PMPRCONFIGINTERFACEDELETE g_pMprConfigInterfaceDelete;
  356. typedef DWORD (APIENTRY * PMPRCONFIGINTERFACEGETHANDLE)(HANDLE,LPWSTR,HANDLE*);
  357. extern PMPRCONFIGINTERFACEGETHANDLE g_pMprConfigInterfaceGetHandle;
  358. typedef DWORD (APIENTRY * PMPRCONFIGINTERFACEENUM)(HANDLE,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD);
  359. extern PMPRCONFIGINTERFACEENUM g_pMprConfigInterfaceEnum;
  360. typedef DWORD (APIENTRY * PMPRCONFIGINTERFACETRANSPORTADD)(HANDLE,HANDLE,DWORD,LPWSTR,LPBYTE,DWORD,HANDLE*);
  361. extern PMPRCONFIGINTERFACETRANSPORTADD g_pMprConfigInterfaceTransportAdd;
  362. typedef DWORD (APIENTRY * PMPRCONFIGINTERFACETRANSPORTGETINFO)(HANDLE,HANDLE,HANDLE,LPBYTE*,LPDWORD);
  363. extern PMPRCONFIGINTERFACETRANSPORTGETINFO g_pMprConfigInterfaceTransportGetInfo;
  364. typedef DWORD (APIENTRY * PMPRCONFIGINTERFACETRANSPORTSETINFO)(HANDLE,HANDLE,HANDLE,LPBYTE,DWORD);
  365. extern PMPRCONFIGINTERFACETRANSPORTSETINFO g_pMprConfigInterfaceTransportSetInfo;
  366. typedef DWORD (APIENTRY * PMPRCONFIGINTERFACETRANSPORTGETHANDLE)(HANDLE,HANDLE,DWORD,HANDLE*);
  367. extern PMPRCONFIGINTERFACETRANSPORTGETHANDLE g_pMprConfigInterfaceTransportGetHandle;
  368. typedef DWORD (APIENTRY * PMPRINFOCREATE)(DWORD,LPVOID*);
  369. extern PMPRINFOCREATE g_pMprInfoCreate;
  370. typedef DWORD (APIENTRY * PMPRINFODELETE)(LPVOID);
  371. extern PMPRINFODELETE g_pMprInfoDelete;
  372. typedef DWORD (APIENTRY * PMPRINFODUPLICATE)(LPVOID,LPVOID*);
  373. extern PMPRINFODUPLICATE g_pMprInfoDuplicate;
  374. typedef DWORD (APIENTRY * PMPRINFOBLOCKADD)(LPVOID,DWORD,DWORD,DWORD,LPBYTE,LPVOID*);
  375. extern PMPRINFOBLOCKADD g_pMprInfoBlockAdd;
  376. typedef DWORD (APIENTRY * PMPRINFOBLOCKREMOVE)(LPVOID,DWORD,LPVOID*);
  377. extern PMPRINFOBLOCKREMOVE g_pMprInfoBlockRemove;
  378. typedef DWORD (APIENTRY * PMPRINFOBLOCKSET)(LPVOID,DWORD,DWORD,DWORD,LPBYTE,LPVOID*);
  379. extern PMPRINFOBLOCKSET g_pMprInfoBlockSet;
  380. typedef DWORD (APIENTRY * PMPRINFOBLOCKFIND)(LPVOID,DWORD,LPDWORD,LPDWORD,LPBYTE*);
  381. extern PMPRINFOBLOCKFIND g_pMprInfoBlockFind;
  382. //
  383. // Miscellaneous entry points.
  384. //
  385. // These are included for consistency because they
  386. // are remotable by the RAS RPC interface.
  387. //
  388. typedef DWORD (*PGETINSTALLEDPROTOCOLS)();
  389. extern PGETINSTALLEDPROTOCOLS g_pGetInstalledProtocols;
  390. typedef DWORD (*PGETINSTALLEDPROTOCOLSEX)(HANDLE, BOOL, BOOL, BOOL);
  391. extern PGETINSTALLEDPROTOCOLSEX g_pGetInstalledProtocolsEx;
  392. typedef DWORD (*PGETUSERPREFERENCES)(HANDLE, PBUSER*, DWORD);
  393. extern PGETUSERPREFERENCES g_pGetUserPreferences;
  394. typedef DWORD (*PSETUSERPREFERENCES)(HANDLE, PBUSER*, DWORD);
  395. extern PSETUSERPREFERENCES g_pSetUserPreferences;
  396. typedef DWORD (WINAPI *PGETSYSTEMDIRECTORY)(HANDLE, LPTSTR, UINT);
  397. extern PGETSYSTEMDIRECTORY g_pGetSystemDirectory;
  398. /*----------------------------------------------------------------------------
  399. ** Prototypes
  400. **----------------------------------------------------------------------------
  401. */
  402. BOOL
  403. IsRasmanServiceRunning(
  404. void );
  405. DWORD
  406. LoadMpradminDll(
  407. void );
  408. DWORD
  409. LoadRasapi32Dll(
  410. void );
  411. DWORD
  412. LoadRasdlgDll(
  413. void );
  414. DWORD
  415. LoadRasmanDll(
  416. void );
  417. #if 0
  418. DWORD
  419. LoadRasRpcDll(
  420. LPTSTR lpszServer
  421. );
  422. #endif
  423. BOOL
  424. Rasapi32DllLoaded(
  425. void
  426. );
  427. BOOL
  428. RasRpcDllLoaded(
  429. void
  430. );
  431. LPTSTR
  432. RemoteGetServerName(
  433. HANDLE hConnection
  434. );
  435. DWORD
  436. RemoteGetServerVersion(
  437. HANDLE hConnection
  438. );
  439. BOOL
  440. IsRasRemoteConnection(
  441. HANDLE hConnection
  442. );
  443. VOID
  444. UnloadMpradminDll(
  445. void );
  446. VOID
  447. UnloadRasapi32Dll(
  448. void );
  449. VOID
  450. UnloadRasdlgDll(
  451. void );
  452. VOID
  453. UnloadRasmanDll(
  454. void );
  455. DWORD
  456. UnloadRasRpcDll(
  457. void );
  458. DWORD
  459. InitializeConnection(
  460. LPTSTR lpszServer,
  461. HANDLE *pHConnection);
  462. VOID
  463. UninitializeConnection(
  464. HANDLE hConnection);
  465. DWORD
  466. RemoteGetInstalledProtocols(
  467. HANDLE hConnection
  468. );
  469. DWORD
  470. RemoteGetInstalledProtocolsEx(
  471. HANDLE hConnection,
  472. BOOL fRouter,
  473. BOOL fRasCli,
  474. BOOL fRasSrv );
  475. UINT WINAPI
  476. RemoteGetSystemDirectory(
  477. HANDLE hConnection,
  478. LPTSTR lpBuffer,
  479. UINT uSize );
  480. DWORD
  481. RemoteGetUserPreferences(
  482. HANDLE hConnection,
  483. OUT PBUSER* pPbuser,
  484. IN DWORD dwMode );
  485. DWORD APIENTRY
  486. RemoteRasDeleteEntry(
  487. HANDLE hConnection,
  488. LPTSTR lpszPhonebook,
  489. LPTSTR lpszEntry );
  490. DWORD APIENTRY
  491. RemoteRasDeviceEnum(
  492. HANDLE hConnection,
  493. PCHAR pszDeviceType,
  494. PBYTE lpDevices,
  495. PDWORD pwcbDevices,
  496. PDWORD pwcDevices );
  497. DWORD APIENTRY
  498. RemoteRasEnumConnections(
  499. HANDLE hConnection,
  500. LPRASCONN lpRasConn,
  501. LPDWORD lpdwcbRasConn,
  502. LPDWORD lpdwcRasConn );
  503. DWORD APIENTRY
  504. RemoteRasGetCountryInfo(
  505. HANDLE hConnection,
  506. LPRASCTRYINFO lpRasCountryInfo,
  507. LPDWORD lpdwcbRasCountryInfo );
  508. DWORD APIENTRY
  509. RemoteRasGetDevConfig(
  510. HANDLE hConnection,
  511. HPORT hport,
  512. PCHAR pszDeviceType,
  513. PBYTE lpConfig,
  514. LPDWORD lpcbConfig );
  515. DWORD APIENTRY
  516. RemoteRasGetErrorString(
  517. HANDLE hConnection,
  518. UINT uErrorValue,
  519. LPTSTR lpszBuf,
  520. DWORD cbBuf );
  521. DWORD APIENTRY
  522. RemoteRasPortEnum(
  523. HANDLE hConnection,
  524. PBYTE lpPorts,
  525. PDWORD pdwcbPorts,
  526. PDWORD pdwcPorts );
  527. DWORD
  528. RemoteSetUserPreferences(
  529. HANDLE hConnection,
  530. OUT PBUSER* pPbuser,
  531. IN DWORD dwMode );
  532. DWORD APIENTRY
  533. RemoteRasPortGetInfo(
  534. HANDLE hConnection,
  535. HPORT porthandle,
  536. PBYTE buffer,
  537. PDWORD pSize );
  538. UINT WINAPI
  539. RasGetSystemDirectory(
  540. HANDLE hConnection,
  541. LPTSTR lpBuffer,
  542. UINT uSize
  543. );
  544. #endif // _LOADDLLS_H_