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.

171 lines
3.2 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. coreldr8.c
  5. Abstract:
  6. This source file implements the operations needed to properly migrate
  7. CorelDRAW8 settings from Windows 9x to Windows NT. This is part of the
  8. Setup Migration DLL.
  9. Author:
  10. Ovidiu Temereanca (ovidiut) 02-Jun-1999
  11. Revision History:
  12. --*/
  13. #include "pch.h"
  14. #include "setupmigp.h"
  15. #define S_GUID_COREL_MEDIA_FOLDERS_8 "{854AF161-1AE1-11D1-AB9B-00C0F00683EB}"
  16. BOOL
  17. CorelDRAW8_Attach (
  18. IN HINSTANCE DllInstance
  19. )
  20. {
  21. return TRUE;
  22. }
  23. BOOL
  24. CorelDRAW8_Detach (
  25. IN HINSTANCE DllInstance
  26. )
  27. {
  28. return TRUE;
  29. }
  30. LONG
  31. CorelDRAW8_QueryVersion (
  32. IN PCSTR *ExeNamesBuf
  33. )
  34. {
  35. HKEY Key;
  36. LONG rc;
  37. rc = TrackedRegOpenKeyA (
  38. HKEY_CLASSES_ROOT,
  39. "CLSID\\" S_GUID_COREL_MEDIA_FOLDERS_8,
  40. &Key
  41. );
  42. if (rc != ERROR_SUCCESS) {
  43. return ERROR_NOT_INSTALLED;
  44. }
  45. CloseRegKey (Key);
  46. return ERROR_SUCCESS;
  47. }
  48. LONG
  49. CorelDRAW8_Initialize9x (
  50. IN PCSTR WorkingDirectory,
  51. IN PCSTR SourceDirectories
  52. )
  53. {
  54. return ERROR_SUCCESS;
  55. }
  56. LONG
  57. CorelDRAW8_MigrateUser9x (
  58. IN HWND ParentWnd,
  59. IN PCSTR UnattendFile,
  60. IN HKEY UserRegKey,
  61. IN PCSTR UserName
  62. )
  63. {
  64. return ERROR_SUCCESS;
  65. }
  66. LONG
  67. CorelDRAW8_MigrateSystem9x (
  68. IN HWND ParentWnd,
  69. IN PCSTR UnattendFile
  70. )
  71. {
  72. PCSTR Msg;
  73. PCSTR Group;
  74. //
  75. // Write a message to the report
  76. //
  77. Group = GetStringResourceA (MSG_PROGRAM_NOTES_CORELMEDIAFOLDERS8);
  78. Msg = GetStringResourceA (MSG_CORELMEDIAFOLDERS8_MESSAGE);
  79. if (!WritePrivateProfileStringA (
  80. S_INCOMPATIBLE_MSGS,
  81. Group,
  82. Msg,
  83. g_MigrateInfPath
  84. )) {
  85. DEBUGMSGA ((DBG_ERROR, "CorelDRAW8 migration DLL: Could not write incompatibility message."));
  86. }
  87. //
  88. // Mark the GUID as bad - once for Object section
  89. //
  90. if (!WritePrivateProfileStringA (
  91. Group,
  92. S_GUID_COREL_MEDIA_FOLDERS_8,
  93. "BADGUID",
  94. g_MigrateInfPath
  95. )) {
  96. DEBUGMSGA ((DBG_ERROR, "CorelDRAW8 migration DLL: Could not write bad GUIDS."));
  97. }
  98. //
  99. // Mark the GUID as bad - and second as Handled, even if it's not really handled
  100. //
  101. if (!WritePrivateProfileStringA (
  102. S_HANDLED,
  103. S_GUID_COREL_MEDIA_FOLDERS_8,
  104. "BADGUID",
  105. g_MigrateInfPath
  106. )) {
  107. DEBUGMSGA ((DBG_ERROR, "CorelDRAW8 migration DLL: Could not write bad GUIDS."));
  108. }
  109. FreeStringResourceA (Msg);
  110. FreeStringResourceA (Group);
  111. return ERROR_SUCCESS;
  112. }
  113. LONG
  114. CorelDRAW8_InitializeNT (
  115. IN PCWSTR WorkingDirectory,
  116. IN PCWSTR SourceDirectories
  117. )
  118. {
  119. return ERROR_SUCCESS;
  120. }
  121. LONG
  122. CorelDRAW8_MigrateUserNT (
  123. IN HINF UnattendFile,
  124. IN HKEY UserRegKey,
  125. IN PCWSTR UserName
  126. )
  127. {
  128. return ERROR_SUCCESS;
  129. }
  130. LONG
  131. CorelDRAW8_MigrateSystemNT (
  132. IN HINF UnattendFile
  133. )
  134. {
  135. return ERROR_SUCCESS;
  136. }