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.

150 lines
6.8 KiB

  1. //+----------------------------------------------------------------------------
  2. //
  3. // File: raslink.h
  4. //
  5. // Module: CMDIAL32.DLL and CMUTOA.DLL
  6. //
  7. // Synopsis: Structures and function types for RAS Linkage.
  8. //
  9. // Copyright (c) 1999 Microsoft Corporation
  10. //
  11. // Author: quintinb Created 05/05/99
  12. //
  13. //+----------------------------------------------------------------------------
  14. //
  15. // If you modify any of the functions below (add/remove/whatever), you may need to modify the
  16. // constant string arrays in common\source\raslink.cpp
  17. //
  18. //
  19. // Ansi prototypes
  20. //
  21. typedef DWORD (WINAPI *pfnRasDeleteEntryA)(LPCSTR, LPCSTR);
  22. typedef DWORD (WINAPI *pfnRasGetEntryPropertiesA)(LPCSTR, LPCSTR, LPRASENTRYA, LPDWORD, LPBYTE, LPDWORD);
  23. typedef DWORD (WINAPI *pfnRasSetEntryPropertiesA)(LPCSTR, LPCSTR, LPRASENTRYA, DWORD, LPBYTE, DWORD);
  24. typedef DWORD (WINAPI *pfnRasGetEntryDialParamsA)(LPCSTR, LPRASDIALPARAMSA, LPBOOL);
  25. typedef DWORD (WINAPI *pfnRasSetEntryDialParamsA)(LPCSTR, LPRASDIALPARAMSA, BOOL);
  26. typedef DWORD (WINAPI *pfnRasEnumDevicesA)(LPRASDEVINFOA, LPDWORD, LPDWORD);
  27. typedef DWORD (WINAPI *pfnRasDialA)(LPRASDIALEXTENSIONS,LPCSTR,LPRASDIALPARAMSA,DWORD,LPVOID,LPHRASCONN);
  28. typedef DWORD (WINAPI *pfnRasGetErrorStringA)(UINT, LPSTR, DWORD);
  29. typedef DWORD (WINAPI *pfnRasGetConnectStatusA)(HRASCONN, LPRASCONNSTATUSA);
  30. // These are never used on win9x but we need a prototype for the struct
  31. typedef DWORD (WINAPI *pfnRasSetSubEntryPropertiesA)(LPCSTR, LPCSTR, DWORD, LPRASSUBENTRYA, DWORD, LPBYTE, DWORD);
  32. typedef DWORD (WINAPI *pfnRasSetCustomAuthDataA)(LPCSTR, LPCSTR, BYTE *, DWORD);
  33. typedef DWORD (WINAPI *pfnRasGetEapUserIdentityA)(LPCSTR, LPCSTR, DWORD, HWND, LPRASEAPUSERIDENTITYA*);
  34. typedef VOID (WINAPI *pfnRasFreeEapUserIdentityA)(LPRASEAPUSERIDENTITYA);
  35. typedef DWORD (WINAPI *pfnRasDeleteSubEntryA)(LPCSTR, LPCSTR, DWORD);
  36. typedef DWORD (WINAPI *pfnRasGetCredentialsA)(LPCSTR, LPCSTR, LPRASCREDENTIALSA);
  37. typedef DWORD (WINAPI *pfnRasSetCredentialsA)(LPCSTR, LPCSTR, LPRASCREDENTIALSA, BOOL);
  38. //
  39. // Unicode Prototypes
  40. //
  41. typedef DWORD (WINAPI *pfnRasDeleteEntryW)(LPCWSTR, LPCWSTR);
  42. typedef DWORD (WINAPI *pfnRasGetEntryPropertiesW)(LPCWSTR, LPCWSTR, LPRASENTRYW, LPDWORD, LPBYTE, LPDWORD);
  43. typedef DWORD (WINAPI *pfnRasSetEntryPropertiesW)(LPCWSTR, LPCWSTR, LPRASENTRYW, DWORD, LPBYTE, DWORD);
  44. typedef DWORD (WINAPI *pfnRasGetEntryDialParamsW)(LPCWSTR, LPRASDIALPARAMSW, LPBOOL);
  45. typedef DWORD (WINAPI *pfnRasSetEntryDialParamsW)(LPCWSTR, LPRASDIALPARAMSW, BOOL);
  46. typedef DWORD (WINAPI *pfnRasEnumDevicesW)(LPRASDEVINFOW, LPDWORD, LPDWORD);
  47. typedef DWORD (WINAPI *pfnRasDialW)(LPRASDIALEXTENSIONS,LPCWSTR,LPRASDIALPARAMSW,DWORD,LPVOID,LPHRASCONN);
  48. typedef DWORD (WINAPI *pfnRasGetErrorStringW)(UINT, LPWSTR, DWORD);
  49. typedef DWORD (WINAPI *pfnRasGetConnectStatusW)(HRASCONN, LPRASCONNSTATUSW);
  50. typedef DWORD (WINAPI *pfnRasSetSubEntryPropertiesW)(LPCWSTR, LPCWSTR, DWORD, LPRASSUBENTRYW, DWORD, LPBYTE, DWORD);
  51. typedef DWORD (WINAPI *pfnRasSetCustomAuthDataW)(LPCWSTR, LPCWSTR, BYTE *, DWORD);
  52. typedef DWORD (WINAPI *pfnRasDeleteSubEntryW)(LPCWSTR, LPCWSTR, DWORD);
  53. typedef DWORD (WINAPI *pfnRasGetEapUserIdentityW)(LPCWSTR, LPCWSTR, DWORD, HWND, LPRASEAPUSERIDENTITYW*);
  54. typedef VOID (WINAPI *pfnRasFreeEapUserIdentityW)(LPRASEAPUSERIDENTITYW);
  55. typedef DWORD (WINAPI *pfnRasGetCredentialsW)(LPCWSTR, LPCWSTR, LPRASCREDENTIALSW);
  56. typedef DWORD (WINAPI *pfnRasSetCredentialsW)(LPCWSTR, LPCWSTR, LPRASCREDENTIALSW, BOOL);
  57. //
  58. // Char size independent prototypes
  59. //
  60. typedef DWORD (WINAPI *pfnRasInvokeEapUI) (HRASCONN, DWORD, LPRASDIALEXTENSIONS, HWND);
  61. typedef DWORD (WINAPI *pfnRasHangUp)(HRASCONN);
  62. //
  63. // Structure used to describe the linkage to RAS. NOTE: Changes to this structure
  64. // will probably require changes to LinkToRas() and UnlinkFromRas() as well as the
  65. // win9x UtoA code in cmutoa.cpp.
  66. //
  67. typedef struct _RasLinkageStructA {
  68. HINSTANCE hInstRas;
  69. HINSTANCE hInstRnaph;
  70. union {
  71. struct {
  72. pfnRasDeleteEntryA pfnDeleteEntry;
  73. pfnRasGetEntryPropertiesA pfnGetEntryProperties;
  74. pfnRasSetEntryPropertiesA pfnSetEntryProperties;
  75. pfnRasGetEntryDialParamsA pfnGetEntryDialParams;
  76. pfnRasSetEntryDialParamsA pfnSetEntryDialParams;
  77. pfnRasEnumDevicesA pfnEnumDevices;
  78. pfnRasDialA pfnDial;
  79. pfnRasHangUp pfnHangUp;
  80. pfnRasGetErrorStringA pfnGetErrorString;
  81. pfnRasGetConnectStatusA pfnGetConnectStatus;
  82. pfnRasSetSubEntryPropertiesA pfnSetSubEntryProperties;
  83. pfnRasDeleteSubEntryA pfnDeleteSubEntry;
  84. pfnRasSetCustomAuthDataA pfnSetCustomAuthData;
  85. pfnRasGetEapUserIdentityA pfnGetEapUserIdentity;
  86. pfnRasFreeEapUserIdentityA pfnFreeEapUserIdentity;
  87. pfnRasInvokeEapUI pfnInvokeEapUI;
  88. pfnRasGetCredentialsA pfnGetCredentials;
  89. pfnRasSetCredentialsA pfnSetCredentials;
  90. };
  91. void *apvPfnRas[19]; // This was from the old hacking code. The size of
  92. // apvPfnRas[] should always be 1 size bigger than
  93. // the number of functions.
  94. // Refer to apszRas[] in 'ras.cpp'. The size of
  95. // apszRas[] is equal to sizeof(apvPfnRas[]).
  96. };
  97. } RasLinkageStructA ;
  98. typedef struct _RasLinkageStructW {
  99. HINSTANCE hInstRas;
  100. union {
  101. struct {
  102. pfnRasDeleteEntryW pfnDeleteEntry;
  103. pfnRasGetEntryPropertiesW pfnGetEntryProperties;
  104. pfnRasSetEntryPropertiesW pfnSetEntryProperties;
  105. pfnRasGetEntryDialParamsW pfnGetEntryDialParams;
  106. pfnRasSetEntryDialParamsW pfnSetEntryDialParams;
  107. pfnRasEnumDevicesW pfnEnumDevices;
  108. pfnRasDialW pfnDial;
  109. pfnRasHangUp pfnHangUp;
  110. pfnRasGetErrorStringW pfnGetErrorString;
  111. pfnRasGetConnectStatusW pfnGetConnectStatus;
  112. pfnRasSetSubEntryPropertiesW pfnSetSubEntryProperties;
  113. pfnRasDeleteSubEntryW pfnDeleteSubEntry;
  114. pfnRasSetCustomAuthDataW pfnSetCustomAuthData;
  115. pfnRasGetEapUserIdentityW pfnGetEapUserIdentity;
  116. pfnRasFreeEapUserIdentityW pfnFreeEapUserIdentity;
  117. pfnRasInvokeEapUI pfnInvokeEapUI;
  118. pfnRasGetCredentialsW pfnGetCredentials;
  119. pfnRasSetCredentialsW pfnSetCredentials;
  120. };
  121. void *apvPfnRas[19]; // This was from the old hacking code. The size of
  122. // apvPfnRas[] should always be 1 size bigger than
  123. // the number of functions.
  124. // Refer to apszRas[] in 'ras.cpp'. The size of
  125. // apszRas[] is equal to sizeof(apvPfnRas[]).
  126. };
  127. } RasLinkageStructW ;
  128. #ifdef UNICODE
  129. #define RasLinkageStruct RasLinkageStructW
  130. #else
  131. #define RasLinkageStruct RasLinkageStructA
  132. #endif