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.

189 lines
3.6 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. winfax.c
  5. Abstract:
  6. This source file implements the operations needed to properly migrate
  7. Symantec WinFax Starter Edition (shipped as a value-add component to
  8. Outlook 2000). In particular, this migration dll is designed to get rid of the
  9. incompatiblity message reported by the printer migration dll and clean up
  10. some registry settings.
  11. Author:
  12. Marc R. Whitten (marcw) 14-Jul-1999
  13. Revision History:
  14. --*/
  15. #include "pch.h"
  16. #include "setupmigp.h"
  17. #define S_WINFAX_STARTER_REGKEYA "HKLM\\System\\CurrentControlSet\\Control\\Print\\Printers\\Symantec WinFax Starter Edition"
  18. PSTR g_HandleArray[] = {
  19. "HKLM\\Software\\Microsoft\\Office\\8.0\\Outlook\\OLFax",
  20. "HKLM\\Software\\Microsoft\\Office\\9.0\\Outlook\\OLFax",
  21. "HKLM\\Software\\Microsoft\\Active Setup\\Outlook Uninstall\\OMF95",
  22. "HKR\\Software\\Microsoft\\Office\\8.0\\Outlook\\OLFax",
  23. "HKR\\Software\\Microsoft\\Office\\9.0\\Outlook\\OLFax",
  24. "HKR\\Software\\Microsoft\\Office\\9.0\\Outlook\\Setup\\WinFax",
  25. "HKR\\Software\\Microsoft\\Office\\8.0\\Outlook\\Setup\\WinFax",
  26. "HKR\\Software\\Microsoft\\Office\\9.0\\Outlook\\Setup\\WinFax",
  27. "HKR\\Software\\Microsoft\\Office\\8.0\\Outlook\\Setup\\WinFax",
  28. "HKR\\Software\\Microsoft\\Office\\9.0\\Outlook\\Setup\\[WinFaxWizard]",
  29. "HKR\\Software\\Microsoft\\Office\\8.0\\Outlook\\Setup\\[WinFaxWizard]",
  30. ""
  31. };
  32. BOOL
  33. SymantecWinFax_Attach (
  34. IN HINSTANCE DllInstance
  35. )
  36. {
  37. return TRUE;
  38. }
  39. BOOL
  40. SymantecWinFax_Detach (
  41. IN HINSTANCE DllInstance
  42. )
  43. {
  44. return TRUE;
  45. }
  46. LONG
  47. SymantecWinFax_QueryVersion (
  48. IN PCSTR *ExeNamesBuf
  49. )
  50. {
  51. HKEY h;
  52. h = OpenRegKeyStrA ("HKLM\\Software\\Microsoft\\Active Setup\\Outlook Uninstall\\OMF95");
  53. if (!h) {
  54. return ERROR_NOT_INSTALLED;
  55. }
  56. CloseRegKey (h);
  57. return ERROR_SUCCESS;
  58. }
  59. LONG
  60. SymantecWinFax_Initialize9x (
  61. IN PCSTR WorkingDirectory,
  62. IN PCSTR SourceDirectories
  63. )
  64. {
  65. return ERROR_SUCCESS;
  66. }
  67. LONG
  68. SymantecWinFax_MigrateUser9x (
  69. IN HWND ParentWnd,
  70. IN PCSTR UnattendFile,
  71. IN HKEY UserRegKey,
  72. IN PCSTR UserName
  73. )
  74. {
  75. return ERROR_SUCCESS;
  76. }
  77. LONG
  78. SymantecWinFax_MigrateSystem9x (
  79. IN HWND ParentWnd,
  80. IN PCSTR UnattendFile
  81. )
  82. {
  83. HKEY h;
  84. PSTR *p;
  85. //
  86. // Handle the registry key so that the printer migration dll doesn't report it as incompatible.
  87. //
  88. WritePrivateProfileStringA (
  89. S_HANDLED,
  90. S_WINFAX_STARTER_REGKEYA,
  91. "Registry",
  92. g_MigrateInfPath
  93. );
  94. //
  95. // Handle other registry keys so that the reinstall will actually work.
  96. //
  97. for (p = g_HandleArray; **p; p++) {
  98. h = OpenRegKeyStrA (*p);
  99. if (h) {
  100. WritePrivateProfileStringA (
  101. S_HANDLED,
  102. *p,
  103. "Registry",
  104. g_MigrateInfPath
  105. );
  106. CloseRegKey (h);
  107. }
  108. }
  109. return ERROR_SUCCESS;
  110. }
  111. //
  112. // Nothing to do during GUI mode.
  113. //
  114. LONG
  115. SymantecWinFax_InitializeNT (
  116. IN PCWSTR WorkingDirectory,
  117. IN PCWSTR SourceDirectories
  118. )
  119. {
  120. return ERROR_SUCCESS;
  121. }
  122. LONG
  123. SymantecWinFax_MigrateUserNT (
  124. IN HINF UnattendFile,
  125. IN HKEY UserRegKey,
  126. IN PCWSTR UserName
  127. )
  128. {
  129. return ERROR_SUCCESS;
  130. }
  131. LONG
  132. SymantecWinFax_MigrateSystemNT (
  133. IN HINF UnattendFile
  134. )
  135. {
  136. return ERROR_SUCCESS;
  137. }