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.

108 lines
6.6 KiB

  1. //+----------------------------------------------------------------------------
  2. //
  3. // File: raslink.cpp
  4. //
  5. // Module: CMDIAL32.DLL AND CMUTOA.DLL
  6. //
  7. // Synopsis: Declaration of the function name lists that are used for RAS
  8. // linkage.
  9. //
  10. // Copyright (c) 1999 Microsoft Corporation
  11. //
  12. // Author: quintinb Created Header 08/19/99
  13. //
  14. //+----------------------------------------------------------------------------
  15. // The RAS linkage system in CM is somewhat complicated. Unfortunately, RAS is different
  16. // on pretty much every version of the OS we have ever shipped. There are APIs on the NT
  17. // family that don't exist on the Win9x side and vice versa. In order for CM to dynamically
  18. // allocate the correct functions without too much work, we have created the following
  19. // arrays of function names used by LinkToRas. To further complicate matters, we have
  20. // the ANSI versus Unicode problem. Thus you will notice that we have three sets of
  21. // function lists. The c_ArrayOfRasFuncsA is actually used by Cmutoa.dll to load the
  22. // real ANSI RAS functions that it calls after converting the parameters from Unicode to
  23. // ANSI in its UA functions, which is why we have the c_ArrayOfRasFuncsUA list. These
  24. // functions are the wrappers exported by cmutoa.dll that cmdial32.dll links to on Win9x
  25. // instead of the W APIs located in c_ArrayOfRasFuncsW that it uses on NT. Please look
  26. // at LinkToRas in cmdial\ras.cpp and InitCmRasUtoA in uapi\cmutoa.cpp. If you change
  27. // anything here you will probably have to change the structs in raslink.h and probably
  28. // even the code in the two functions above. Changer Beware!
  29. #ifdef _CMUTOA_MODULE
  30. static LPCSTR c_ArrayOfRasFuncsA[] = { "RasDeleteEntryA",
  31. "RasGetEntryPropertiesA",
  32. "RasSetEntryPropertiesA",
  33. "RasGetEntryDialParamsA",
  34. "RasSetEntryDialParamsA",
  35. "RasEnumDevicesA",
  36. "RasDialA",
  37. "RasHangUpA",
  38. "RasGetErrorStringA",
  39. "RasGetConnectStatusA",
  40. "RasGetProjectionInfoA",
  41. "RasSetSubEntryPropertiesA",
  42. "RasDeleteSubEntryA",
  43. NULL, //"RasSetCustomAuthDataA",
  44. NULL, //"RasGetEapUserIdentityA",
  45. NULL, //"RasFreeEapUserIdentityA",
  46. NULL, //"RasInvokeEapUI",
  47. NULL, //"RasGetCredentials",
  48. NULL, //"RasSetCredentials",
  49. NULL, //"GetCustomAuthData",
  50. NULL
  51. };
  52. #else
  53. static LPCSTR c_ArrayOfRasFuncsUA[] = { "RasDeleteEntryUA",
  54. "RasGetEntryPropertiesUA",
  55. "RasSetEntryPropertiesUA",
  56. "RasGetEntryDialParamsUA",
  57. "RasSetEntryDialParamsUA",
  58. "RasEnumDevicesUA",
  59. "RasDialUA",
  60. "RasHangUpUA",
  61. "RasGetErrorStringUA",
  62. "RasGetConnectStatusUA",
  63. "RasGetProjectionInfoUA",
  64. "RasSetSubEntryPropertiesUA",
  65. "RasDeleteSubEntryUA",
  66. NULL, //"RasSetCustomAuthDataUA",
  67. NULL, //"RasGetEapUserIdentityUA",
  68. NULL, //"RasFreeEapUserIdentityUA",
  69. NULL, //"RasInvokeEapUI",
  70. NULL, //"RasGetCredentials",
  71. NULL, //"RasSetCredentials",
  72. NULL, //"GetCustomAuthData",
  73. NULL
  74. };
  75. static LPCSTR c_ArrayOfRasFuncsW[] = { "RasDeleteEntryW",
  76. "RasGetEntryPropertiesW",
  77. "RasSetEntryPropertiesW",
  78. "RasGetEntryDialParamsW",
  79. "RasSetEntryDialParamsW",
  80. "RasEnumDevicesW",
  81. "RasDialW",
  82. "RasHangUpW",
  83. "RasGetErrorStringW",
  84. "RasGetConnectStatusW",
  85. "RasGetProjectionInfoW",
  86. "RasSetSubEntryPropertiesW",
  87. "RasDeleteSubEntryW",
  88. "RasSetCustomAuthDataW",
  89. "RasGetEapUserIdentityW",
  90. "RasFreeEapUserIdentityW",
  91. "RasInvokeEapUI",
  92. "RasGetCredentialsW",
  93. "RasSetCredentialsW",
  94. "RasGetCustomAuthDataW",
  95. NULL
  96. };
  97. #endif
  98. // Regarding DwDeleteSubEntry and RasDeleteSubEntry - NT5 shipped first
  99. // with DwDeleteSubEntry, a private API. Millennium shipped next, by
  100. // which time it looked like this was going to have to be made public,
  101. // so it was prefixed with Ras. NT5.1 made the corresponding name change
  102. // on the NT side, which we handle within LinkToRas (along with all other such
  103. // cases).