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.

143 lines
4.0 KiB

  1. /*
  2. * basesnap.rgs
  3. *
  4. *
  5. * Copyright (c) 1998-1999 Microsoft Corporation
  6. *
  7. * PURPOSE: Defines strings from which a registry script is built on the fly.
  8. *
  9. *
  10. * OWNER: ptousig
  11. */
  12. // usage: str.FormatSz(szfmtSnapinRegScript1, szVersion);
  13. LPCTSTR szfmtSnapinRegScript1 = _T(" \r\n\
  14. HKCR \r\n\
  15. { \r\n\
  16. '%%DLLName%%.%%ClassName%%.1' = s '%%ClassName%% Class' \r\n\
  17. { \r\n\
  18. 'CLSID' = s '%%CLSID_Snapin%%' \r\n\
  19. } \r\n\
  20. '%%DLLName%%.%%ClassName%%' = s '%%ClassName%% Class' \r\n\
  21. { \r\n\
  22. 'CLSID' = s '%%CLSID_Snapin%%' \r\n\
  23. } \r\n\
  24. NoRemove 'CLSID' \r\n\
  25. { \r\n\
  26. ForceRemove '%%CLSID_Snapin%%' = s '%%ClassName%% Class' \r\n\
  27. { \r\n\
  28. 'ProgID' = s '%%DLLName%%.%%ClassName%%.1' \r\n\
  29. 'VersionIndependentProgID' = s '%%DLLName%%.%%ClassName%%' \r\n\
  30. 'InprocServer32' = s '%%MODULE%%' \r\n\
  31. { \r\n\
  32. val 'ThreadingModel' = s 'both' \r\n\
  33. } \r\n\
  34. 'Version' = s '%s'\r\n\
  35. } \r\n\
  36. } \r\n\
  37. }");
  38. // usage: str.FormatSz(szfmtSnapinRegScript2, szVersion, szStandalone, szSnapinNodeTypesScript, szExtensionNodeTypesScript);
  39. LPCTSTR szfmtSnapinRegScript2 = _T(" \r\n\
  40. HKLM \r\n\
  41. { \r\n\
  42. NoRemove 'Software'\r\n\
  43. { \r\n\
  44. NoRemove 'Microsoft'\r\n\
  45. { \r\n\
  46. NoRemove 'MMC'\r\n\
  47. { \r\n\
  48. NoRemove 'Snapins'\r\n\
  49. { \r\n\
  50. ForceRemove '%%CLSID_Snapin%%'\r\n\
  51. { \r\n\
  52. val 'NameString' = s '%%SnapinName%%'\r\n\
  53. val 'NodeType' = s '%%CLSID_NodeType%%'\r\n\
  54. val 'Version' = s '%s' \r\n\
  55. val 'About' = s '%%CLSID_About%%'\r\n%s\
  56. ForceRemove 'ColumnPersistence' \r\n\
  57. { \r\n\
  58. } \r\n\
  59. 'NodeTypes' %s \r\n\
  60. } \r\n\
  61. } \r\n\
  62. NoRemove 'NodeTypes'\r\n\
  63. { \r\n\
  64. %s \r\n\
  65. } \r\n\
  66. } \r\n\
  67. } \r\n\
  68. } \r\n\
  69. }");
  70. // usage: str.strcpy(szStandalone)
  71. LPCTSTR szStandalone = _T("\
  72. 'StandAlone' \r\n");
  73. // usage: str.FormatSz(szSnapinAboutRegScript, szVersion)
  74. LPCTSTR szSnapinAboutRegScript = _T(" \r\n\
  75. HKCR \r\n\
  76. { \r\n\
  77. '%%DLLName%%.About%%ClassName%%.1' = s 'About%%ClassName%% Class' \r\n\
  78. { \r\n\
  79. 'CLSID' = s '%%CLSID_About%%' \r\n\
  80. } \r\n\
  81. '%%DLLName%%.About%%ClassName%%' = s 'About%%ClassName%% Class' \r\n\
  82. { \r\n\
  83. 'CLSID' = s '%%CLSID_About%%' \r\n\
  84. } \r\n\
  85. NoRemove 'CLSID' \r\n\
  86. { \r\n\
  87. ForceRemove '%%CLSID_About%%' = s 'About%%ClassName%% Class' \r\n\
  88. { \r\n\
  89. 'ProgID' = s '%%DLLName%%.About%%ClassName%%.1' \r\n\
  90. 'VersionIndependentProgID' = s '%%DLLName%%.About%%ClassName%%' \r\n\
  91. 'InprocServer32' = s '%%MODULE%%' \r\n\
  92. { \r\n\
  93. val 'ThreadingModel' = s 'both' \r\n\
  94. } \r\n\
  95. 'Version' = s '%s' \r\n\
  96. } \r\n\
  97. } \r\n\
  98. }");
  99. // usage: str.FormatSz(szfmtString, szSomeString);
  100. LPCTSTR szfmtString = _T("%s");
  101. // usage: str.FormatSz(szfmtSingleExtension, szSomeString);
  102. LPCTSTR szfmtSingleExtension = _T(" \r\n\
  103. { \r\n\
  104. %s \r\n\
  105. } ");
  106. // usage: str.strcat(szSnapinNodeTypeOpen);
  107. LPCTSTR szSnapinNodeTypeOpen = _T(" \r\n\
  108. { ");
  109. // usage: str.strcat(szSnapinNodeTypeOpen);
  110. LPCTSTR szFmtSnapinNodeType = _T(" \r\n\
  111. ForceRemove '%s' ");
  112. // usage: str.strcat(szSnapinNodeTypeClose);
  113. LPCTSTR szSnapinNodeTypeClose = _T(" \r\n\
  114. } ");
  115. // usage: str.FormatSz(szfmtAllExtensions, szCLSID_NodeTypeExtends, szNameSpaceScript,
  116. // szContextMenuScript, szPropertySheetScript, szToolBarScript)
  117. LPCTSTR szfmtAllExtensions = _T(" \r\n\
  118. NoRemove %s \r\n\
  119. { \r\n\
  120. NoRemove 'Extensions' \r\n\
  121. { \r\n\
  122. NoRemove 'NameSpace' %s \r\n\
  123. NoRemove 'ContextMenu' %s \r\n\
  124. NoRemove 'PropertySheet' %s \r\n\
  125. NoRemove 'ToolBar' %s \r\n\
  126. } \r\n\
  127. } ");
  128. // usage: str.strcpy(szSingleExtension)
  129. LPCTSTR szSingleExtension = _T(" \r\n\
  130. val '%CLSID_Snapin%' = s '%SnapinName%' ");