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.

137 lines
2.7 KiB

  1. //+----------------------------------------------------------------------------
  2. //
  3. // File: migrate.h
  4. //
  5. // Module: MIGRATE.DLL
  6. //
  7. // Synopsis: Definitions for the Connection Manager Win9x Migration Dll
  8. //
  9. // Copyright (c) 1998-1999 Microsoft Corporation
  10. //
  11. // Author: quintinb created 08/20/98
  12. //
  13. //+----------------------------------------------------------------------------
  14. #define _MBCS // for dbcs compatibility
  15. #ifndef _CM_MIGRATE_H
  16. #define _CM_MIGRATE_H
  17. #include <windows.h>
  18. #include <setupapi.h>
  19. #include <stdlib.h>
  20. #include <tchar.h>
  21. #include <lmcons.h>
  22. #include "cmdebug.h"
  23. #include "cmakreg.h"
  24. #include "cmsetup.h"
  25. #include "cmsecure.h"
  26. #include "dynamiclib.h"
  27. #include "pwutil.h"
  28. #include "base_str.h"
  29. #include "pwd_str.h"
  30. #include "reg_str.h"
  31. #include "uninstcm_str.h"
  32. #include "msg.h"
  33. //
  34. // Constants
  35. //
  36. const TCHAR* const c_pszProductIdString = "Microsoft Connection Manager";
  37. const TCHAR* const c_pszDirectory = "Directory";
  38. const TCHAR* const c_pszSectionHandled = "Handled";
  39. const TCHAR* const c_pszW95Inf16 = "w95inf16";
  40. const TCHAR* const c_pszW95Inf32 = "w95inf32";
  41. const TCHAR* const c_pszDll = ".dll";
  42. const TCHAR* const c_pszTmp = ".tmp";
  43. const UINT uCmMigrationVersion = 1;
  44. //
  45. // Types
  46. //
  47. typedef struct {
  48. CHAR CompanyName[256];
  49. CHAR SupportNumber[256];
  50. CHAR SupportUrl[256];
  51. CHAR InstructionsToUser[1024];
  52. } VENDORINFO, *PVENDORINFO;
  53. typedef WORD (WINAPI *GetCachedPassword)(LPSTR, WORD, LPSTR, LPWORD, BYTE);
  54. //
  55. // Utility Function Headers
  56. //
  57. BOOL ReadEncryptionOption(BOOL* pfFastEncryption);
  58. BOOL EncryptPassword(IN LPCTSTR pszPassword, OUT LPTSTR pszEncryptedPassword,
  59. OUT LPDWORD lpdwBufSize, OUT LPDWORD lpdwCryptType);
  60. BOOL EnsureEncryptedPasswordInCmpIfSaved(LPCTSTR pszLongServiceName, LPCTSTR szCmpPath);
  61. //
  62. // Migration Dll Function Headers
  63. //
  64. LONG
  65. CALLBACK
  66. QueryVersion (
  67. OUT LPCSTR *ProductID,
  68. OUT LPUINT DllVersion,
  69. OUT LPINT *CodePageArray, //OPTIONAL
  70. OUT LPCSTR *ExeNamesBuf, //OPTIONAL
  71. OUT PVENDORINFO *VendorInfo
  72. );
  73. LONG
  74. CALLBACK
  75. Initialize9x (
  76. IN LPCSTR WorkingDirectory,
  77. IN LPCSTR SourceDirectories,
  78. IN LPCSTR MediaDirectory
  79. );
  80. LONG
  81. CALLBACK
  82. MigrateUser9x (
  83. IN HWND ParentWnd,
  84. IN LPCSTR AnswerFile,
  85. IN HKEY UserRegKey,
  86. IN LPCSTR UserName,
  87. LPVOID Reserved
  88. );
  89. LONG
  90. CALLBACK
  91. MigrateSystem9x (
  92. IN HWND ParentWnd,
  93. IN LPCSTR AnswerFile,
  94. LPVOID Reserved
  95. );
  96. LONG
  97. CALLBACK
  98. InitializeNT (
  99. IN LPCWSTR WorkingDirectory,
  100. IN LPCWSTR SourceDirectories,
  101. LPVOID Reserved
  102. );
  103. LONG
  104. CALLBACK
  105. MigrateUserNT (
  106. IN HINF UnattendInfHandle,
  107. IN HKEY UserRegHandle,
  108. IN LPCWSTR UserName,
  109. LPVOID Reserved
  110. );
  111. LONG
  112. CALLBACK
  113. MigrateSystemNT (
  114. IN HINF UnattendInfHandle,
  115. LPVOID Reserved
  116. );
  117. #endif //_CM_MIGRATE_H