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.

158 lines
7.5 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. typedef DWORD (WINAPI* pfnRasGetCustomAuthDataA)(LPCSTR, LPCSTR, PBYTE, DWORD*);
  39. typedef DWORD (WINAPI* pfnRasGetProjectionInfoA)(HRASCONN, RASPROJECTION, LPVOID, LPDWORD);
  40. //
  41. // Unicode Prototypes
  42. //
  43. typedef DWORD (WINAPI *pfnRasDeleteEntryW)(LPCWSTR, LPCWSTR);
  44. typedef DWORD (WINAPI *pfnRasGetEntryPropertiesW)(LPCWSTR, LPCWSTR, LPRASENTRYW, LPDWORD, LPBYTE, LPDWORD);
  45. typedef DWORD (WINAPI *pfnRasSetEntryPropertiesW)(LPCWSTR, LPCWSTR, LPRASENTRYW, DWORD, LPBYTE, DWORD);
  46. typedef DWORD (WINAPI *pfnRasGetEntryDialParamsW)(LPCWSTR, LPRASDIALPARAMSW, LPBOOL);
  47. typedef DWORD (WINAPI *pfnRasSetEntryDialParamsW)(LPCWSTR, LPRASDIALPARAMSW, BOOL);
  48. typedef DWORD (WINAPI *pfnRasEnumDevicesW)(LPRASDEVINFOW, LPDWORD, LPDWORD);
  49. typedef DWORD (WINAPI *pfnRasDialW)(LPRASDIALEXTENSIONS,LPCWSTR,LPRASDIALPARAMSW,DWORD,LPVOID,LPHRASCONN);
  50. typedef DWORD (WINAPI *pfnRasGetErrorStringW)(UINT, LPWSTR, DWORD);
  51. typedef DWORD (WINAPI *pfnRasGetConnectStatusW)(HRASCONN, LPRASCONNSTATUSW);
  52. typedef DWORD (WINAPI *pfnRasSetSubEntryPropertiesW)(LPCWSTR, LPCWSTR, DWORD, LPRASSUBENTRYW, DWORD, LPBYTE, DWORD);
  53. typedef DWORD (WINAPI *pfnRasSetCustomAuthDataW)(LPCWSTR, LPCWSTR, BYTE *, DWORD);
  54. typedef DWORD (WINAPI *pfnRasDeleteSubEntryW)(LPCWSTR, LPCWSTR, DWORD);
  55. typedef DWORD (WINAPI *pfnRasGetEapUserIdentityW)(LPCWSTR, LPCWSTR, DWORD, HWND, LPRASEAPUSERIDENTITYW*);
  56. typedef VOID (WINAPI *pfnRasFreeEapUserIdentityW)(LPRASEAPUSERIDENTITYW);
  57. typedef DWORD (WINAPI *pfnRasGetCredentialsW)(LPCWSTR, LPCWSTR, LPRASCREDENTIALSW);
  58. typedef DWORD (WINAPI *pfnRasSetCredentialsW)(LPCWSTR, LPCWSTR, LPRASCREDENTIALSW, BOOL);
  59. typedef DWORD (WINAPI* pfnRasGetCustomAuthDataW)(LPCWSTR, LPCWSTR, PBYTE, DWORD*);
  60. typedef DWORD (WINAPI* pfnRasGetProjectionInfoW) (HRASCONN, RASPROJECTION, LPVOID, LPDWORD);
  61. //
  62. // Char size independent prototypes
  63. //
  64. typedef DWORD (WINAPI *pfnRasInvokeEapUI) (HRASCONN, DWORD, LPRASDIALEXTENSIONS, HWND);
  65. typedef DWORD (WINAPI *pfnRasHangUp)(HRASCONN);
  66. //
  67. // Structure used to describe the linkage to RAS. NOTE: Changes to this structure
  68. // will probably require changes to LinkToRas() and UnlinkFromRas() as well as the
  69. // win9x UtoA code in cmutoa.cpp.
  70. //
  71. typedef struct _RasLinkageStructA {
  72. HINSTANCE hInstRas;
  73. HINSTANCE hInstRnaph;
  74. union {
  75. struct {
  76. pfnRasDeleteEntryA pfnDeleteEntry;
  77. pfnRasGetEntryPropertiesA pfnGetEntryProperties;
  78. pfnRasSetEntryPropertiesA pfnSetEntryProperties;
  79. pfnRasGetEntryDialParamsA pfnGetEntryDialParams;
  80. pfnRasSetEntryDialParamsA pfnSetEntryDialParams;
  81. pfnRasEnumDevicesA pfnEnumDevices;
  82. pfnRasDialA pfnDial;
  83. pfnRasHangUp pfnHangUp;
  84. pfnRasGetErrorStringA pfnGetErrorString;
  85. pfnRasGetConnectStatusA pfnGetConnectStatus;
  86. pfnRasGetProjectionInfoA pfnGetProjectionInfo;
  87. pfnRasSetSubEntryPropertiesA pfnSetSubEntryProperties;
  88. pfnRasDeleteSubEntryA pfnDeleteSubEntry;
  89. pfnRasSetCustomAuthDataA pfnSetCustomAuthData;
  90. pfnRasGetEapUserIdentityA pfnGetEapUserIdentity;
  91. pfnRasFreeEapUserIdentityA pfnFreeEapUserIdentity;
  92. pfnRasInvokeEapUI pfnInvokeEapUI;
  93. pfnRasGetCredentialsA pfnGetCredentials;
  94. pfnRasSetCredentialsA pfnSetCredentials;
  95. pfnRasGetCustomAuthDataA pfnGetCustomAuthData;
  96. };
  97. void *apvPfnRas[21]; // This was from the old hacking code. The size of
  98. // apvPfnRas[] should always be 1 size bigger than
  99. // the number of functions.
  100. // Refer to apszRas[] in 'ras.cpp'. The size of
  101. // apszRas[] is equal to sizeof(apvPfnRas[]).
  102. };
  103. } RasLinkageStructA ;
  104. typedef struct _RasLinkageStructW {
  105. HINSTANCE hInstRas;
  106. union {
  107. struct {
  108. pfnRasDeleteEntryW pfnDeleteEntry;
  109. pfnRasGetEntryPropertiesW pfnGetEntryProperties;
  110. pfnRasSetEntryPropertiesW pfnSetEntryProperties;
  111. pfnRasGetEntryDialParamsW pfnGetEntryDialParams;
  112. pfnRasSetEntryDialParamsW pfnSetEntryDialParams;
  113. pfnRasEnumDevicesW pfnEnumDevices;
  114. pfnRasDialW pfnDial;
  115. pfnRasHangUp pfnHangUp;
  116. pfnRasGetErrorStringW pfnGetErrorString;
  117. pfnRasGetConnectStatusW pfnGetConnectStatus;
  118. pfnRasGetProjectionInfoW pfnGetProjectionInfo;
  119. pfnRasSetSubEntryPropertiesW pfnSetSubEntryProperties;
  120. pfnRasDeleteSubEntryW pfnDeleteSubEntry;
  121. pfnRasSetCustomAuthDataW pfnSetCustomAuthData;
  122. pfnRasGetEapUserIdentityW pfnGetEapUserIdentity;
  123. pfnRasFreeEapUserIdentityW pfnFreeEapUserIdentity;
  124. pfnRasInvokeEapUI pfnInvokeEapUI;
  125. pfnRasGetCredentialsW pfnGetCredentials;
  126. pfnRasSetCredentialsW pfnSetCredentials;
  127. pfnRasGetCustomAuthDataW pfnGetCustomAuthData;
  128. };
  129. void *apvPfnRas[21]; // This was from the old hacking code. The size of
  130. // apvPfnRas[] should always be 1 size bigger than
  131. // the number of functions.
  132. // Refer to apszRas[] in 'ras.cpp'. The size of
  133. // apszRas[] is equal to sizeof(apvPfnRas[]).
  134. };
  135. } RasLinkageStructW ;
  136. #ifdef UNICODE
  137. #define RasLinkageStruct RasLinkageStructW
  138. #else
  139. #define RasLinkageStruct RasLinkageStructA
  140. #endif