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.

188 lines
3.4 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. #define S_WINFAX_STARTER_REGKEYA "HKLM\\System\\CurrentControlSet\\Control\\Print\\Printers\\Symantec WinFax Starter Edition"
  17. PSTR g_HandleArray[] = {
  18. "HKLM\\Software\\Microsoft\\Office\\8.0\\Outlook\\OLFax",
  19. "HKLM\\Software\\Microsoft\\Office\\9.0\\Outlook\\OLFax",
  20. "HKLM\\Software\\Microsoft\\Active Setup\\Outlook Uninstall\\OMF95",
  21. "HKR\\Software\\Microsoft\\Office\\8.0\\Outlook\\OLFax",
  22. "HKR\\Software\\Microsoft\\Office\\9.0\\Outlook\\OLFax",
  23. "HKR\\Software\\Microsoft\\Office\\9.0\\Outlook\\Setup\\WinFax",
  24. "HKR\\Software\\Microsoft\\Office\\8.0\\Outlook\\Setup\\WinFax",
  25. "HKR\\Software\\Microsoft\\Office\\9.0\\Outlook\\Setup\\WinFax",
  26. "HKR\\Software\\Microsoft\\Office\\8.0\\Outlook\\Setup\\WinFax",
  27. "HKR\\Software\\Microsoft\\Office\\9.0\\Outlook\\Setup\\[WinFaxWizard]",
  28. "HKR\\Software\\Microsoft\\Office\\8.0\\Outlook\\Setup\\[WinFaxWizard]",
  29. ""
  30. };
  31. BOOL
  32. SymantecWinFax_Attach (
  33. IN HINSTANCE DllInstance
  34. )
  35. {
  36. return TRUE;
  37. }
  38. BOOL
  39. SymantecWinFax_Detach (
  40. IN HINSTANCE DllInstance
  41. )
  42. {
  43. return TRUE;
  44. }
  45. LONG
  46. SymantecWinFax_QueryVersion (
  47. IN PCSTR *ExeNamesBuf
  48. )
  49. {
  50. HKEY h;
  51. h = OpenRegKeyStrA ("HKLM\\Software\\Microsoft\\Active Setup\\Outlook Uninstall\\OMF95");
  52. if (!h) {
  53. return ERROR_NOT_INSTALLED;
  54. }
  55. CloseRegKey (h);
  56. return ERROR_SUCCESS;
  57. }
  58. LONG
  59. SymantecWinFax_Initialize9x (
  60. IN PCSTR WorkingDirectory,
  61. IN PCSTR SourceDirectories
  62. )
  63. {
  64. return ERROR_SUCCESS;
  65. }
  66. LONG
  67. SymantecWinFax_MigrateUser9x (
  68. IN HWND ParentWnd,
  69. IN PCSTR UnattendFile,
  70. IN HKEY UserRegKey,
  71. IN PCSTR UserName
  72. )
  73. {
  74. return ERROR_SUCCESS;
  75. }
  76. LONG
  77. SymantecWinFax_MigrateSystem9x (
  78. IN HWND ParentWnd,
  79. IN PCSTR UnattendFile
  80. )
  81. {
  82. HKEY h;
  83. PSTR *p;
  84. //
  85. // Handle the registry key so that the printer migration dll doesn't report it as incompatible.
  86. //
  87. WritePrivateProfileStringA (
  88. S_HANDLED,
  89. S_WINFAX_STARTER_REGKEYA,
  90. "Registry",
  91. g_MigrateInfPath
  92. );
  93. //
  94. // Handle other registry keys so that the reinstall will actually work.
  95. //
  96. for (p = g_HandleArray; **p; p++) {
  97. h = OpenRegKeyStrA (*p);
  98. if (h) {
  99. WritePrivateProfileStringA (
  100. S_HANDLED,
  101. *p,
  102. "Registry",
  103. g_MigrateInfPath
  104. );
  105. CloseRegKey (h);
  106. }
  107. }
  108. return ERROR_SUCCESS;
  109. }
  110. //
  111. // Nothing to do during GUI mode.
  112. //
  113. LONG
  114. SymantecWinFax_InitializeNT (
  115. IN PCWSTR WorkingDirectory,
  116. IN PCWSTR SourceDirectories
  117. )
  118. {
  119. return ERROR_SUCCESS;
  120. }
  121. LONG
  122. SymantecWinFax_MigrateUserNT (
  123. IN HINF UnattendFile,
  124. IN HKEY UserRegKey,
  125. IN PCWSTR UserName
  126. )
  127. {
  128. return ERROR_SUCCESS;
  129. }
  130. LONG
  131. SymantecWinFax_MigrateSystemNT (
  132. IN HINF UnattendFile
  133. )
  134. {
  135. return ERROR_SUCCESS;
  136. }