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.

237 lines
9.6 KiB

  1. #if !defined (EXTERN)
  2. #define EXTERN extern
  3. #endif
  4. #if !defined (ASSIGN)
  5. #define ASSIGN(value)
  6. #endif
  7. /* the 'extern' must be forced for constant arrays, because 'const'
  8. * in C++ implies 'static' otherwise.
  9. */
  10. #define EXTTEXT(n) extern const CHAR n[]
  11. #define TEXTCONST(name,text) EXTTEXT(name) ASSIGN(text)
  12. TEXTCONST(szHelpFile,"ratings.hlp");
  13. /* TEXTCONST(szProfileList,REGSTR_PATH_SETUP "\\ProfileList"); */
  14. /* TEXTCONST(szSupervisor,"Supervisor"); */
  15. TEXTCONST(szDefaultUserName,".Default");
  16. TEXTCONST(szRatingsSupervisorKeyName,"Key");
  17. TEXTCONST(szLogonKey,"Network\\Logon");
  18. TEXTCONST(szUserProfiles,"UserProfiles");
  19. TEXTCONST(szPOLICYKEY, "System\\CurrentControlSet\\Control\\Update");
  20. TEXTCONST(szPOLICYVALUE, "UpdateMode");
  21. TEXTCONST(szComDlg32,"comdlg32.dll");
  22. TEXTCONST(szShell32,"shell32.dll");
  23. TEXTCONST(szGetOpenFileName,"GetOpenFileNameA"); // we're ANSI, even on NT
  24. TEXTCONST(szShellExecute,"ShellExecuteA");
  25. TEXTCONST(VAL_UNKNOWNS,"Allow_Unknowns");
  26. TEXTCONST(VAL_PLEASEMOM,"PleaseMom");
  27. TEXTCONST(VAL_ENABLED,"Enabled");
  28. TEXTCONST(szPOLUSER, "PolicyData\\Users");
  29. TEXTCONST(szTMPDATA, "PolicyData");
  30. TEXTCONST(szUSERS, "Users");
  31. TEXTCONST(szRATINGS, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Ratings");
  32. TEXTCONST(szRATINGHELPERS, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Rating Helpers");
  33. TEXTCONST(szRORSGUID, "{20EDB660-7CDD-11CF-8DAB-00AA006C1A01}");
  34. TEXTCONST(szCLSID, "CLSID");
  35. TEXTCONST(szINPROCSERVER32, "InProcServer32");
  36. TEXTCONST(szDLLNAME, "msrating.dll");
  37. TEXTCONST(szNTRootDir, "%SystemRoot%\\system32\\");
  38. TEXTCONST(sz9XRootDir, "%WinDir%\\system\\");
  39. TEXTCONST(szTHREADINGMODEL, "ThreadingModel");
  40. TEXTCONST(szAPARTMENT, "Apartment");
  41. TEXTCONST(szPOLFILE, "ratings.pol");
  42. TEXTCONST(szBACKSLASH, "\\");
  43. TEXTCONST(szDEFAULTRATFILE, "RSACi.rat");
  44. TEXTCONST(szFilenameTemplate, "FileName%d"); /* note, mslubase.cpp knows the length of this string is 8 + number length */
  45. TEXTCONST(szNULL, "");
  46. TEXTCONST(szRATINGBUREAU, "Bureau");
  47. /* t-markh 8/98 - Text strings used in parsing PICSRules */
  48. TEXTCONST(szPRShortYes,"y");
  49. TEXTCONST(szPRYes,"yes");
  50. TEXTCONST(szPRShortNo,"n");
  51. TEXTCONST(szPRNo,"no");
  52. TEXTCONST(szPRPass,"pass");
  53. TEXTCONST(szPRFail,"fail");
  54. //t-markh, These are not in the official spec, but we should handle them anyway
  55. TEXTCONST(szPRShortPass,"p");
  56. TEXTCONST(szPRShortFail,"f");
  57. /* Text strings used in parsing rating labels. */
  58. TEXTCONST(szDoubleCRLF,"\r\n\r\n");
  59. TEXTCONST(szPicsOpening,"(PICS-");
  60. TEXTCONST(szWhitespace," \t\r\n");
  61. TEXTCONST(szExtendedAlphaNum,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.,;:&=?!*~@#/");
  62. TEXTCONST(szSingleCharTokens,"()\"");
  63. TEXTCONST(szLeftParen,"(");
  64. TEXTCONST(szRightParen,")");
  65. TEXTCONST(szOptional,"optional");
  66. TEXTCONST(szMandatory,"mandatory");
  67. TEXTCONST(szAtOption,"at");
  68. TEXTCONST(szByOption,"by");
  69. TEXTCONST(szCommentOption,"comment");
  70. TEXTCONST(szCompleteLabelOption,"complete-label");
  71. TEXTCONST(szFullOption,"full");
  72. TEXTCONST(szExtensionOption,"extension");
  73. TEXTCONST(szGenericOption,"generic");
  74. TEXTCONST(szShortGenericOption,"gen");
  75. TEXTCONST(szForOption,"for");
  76. TEXTCONST(szMICOption,"MIC-md5");
  77. TEXTCONST(szMD5Option,"md5");
  78. TEXTCONST(szOnOption,"on");
  79. TEXTCONST(szSigOption,"signature-PKCS");
  80. TEXTCONST(szUntilOption,"until");
  81. TEXTCONST(szExpOption,"exp");
  82. TEXTCONST(szRatings,"ratings");
  83. /* TEXTCONST(szShortRatings,"r"); */
  84. TEXTCONST(szError,"error");
  85. TEXTCONST(szNoRatings,"no-ratings");
  86. TEXTCONST(szLabelWord,"labels");
  87. /* TEXTCONST(szShortLabelWord,"l"); */
  88. TEXTCONST(szShortTrue,"t");
  89. TEXTCONST(szTrue,"true");
  90. TEXTCONST(szShortFalse,"f");
  91. TEXTCONST(szFalse,"false");
  92. /* TEXTCONST(szNegInf,"-INF"); */
  93. /* TEXTCONST(szPosInf,"+INF"); */
  94. TEXTCONST(szLabel,"label");
  95. TEXTCONST(szName,"name");
  96. TEXTCONST(szValue,"value");
  97. TEXTCONST(szIcon,"icon");
  98. TEXTCONST(szDescription, "description");
  99. TEXTCONST(szCategory, "category");
  100. TEXTCONST(szTransmitAs, "transmit-as");
  101. TEXTCONST(szMin,"min");
  102. TEXTCONST(szMax,"max");
  103. /* TEXTCONST(szMultivalue,"multivalue"); */
  104. TEXTCONST(szInteger,"integer");
  105. TEXTCONST(szLabelOnly, "label-only");
  106. TEXTCONST(szPicsVersion,"PICS-version");
  107. TEXTCONST(szRatingSystem,"rating-system");
  108. TEXTCONST(szRatingService,"rating-service");
  109. TEXTCONST(szRatingBureau,"rating-bureau");
  110. TEXTCONST(szBureauRequired,"bureau-required");
  111. TEXTCONST(szDefault,"default");
  112. TEXTCONST(szMultiValue,"multivalue");
  113. TEXTCONST(szUnordered,"unordered");
  114. TEXTCONST(szRatingBureauExtension,"www.w3.org/PICS/service-extensions/label-bureau");
  115. EXTERN CHAR abSupervisorKey[16] ASSIGN({0}); /* supervisor password hash */
  116. EXTERN CHAR fSupervisorKeyInit ASSIGN(FALSE); /* whether abSupervisorKey has been initialized */
  117. //t-markh 8/98
  118. //The following TEXTCONST's are for PICSRules support.
  119. //Dereferenced in picsrule.cpp
  120. TEXTCONST(szPICSRulesVersion,"PicsRule");
  121. TEXTCONST(szPICSRulesPolicy,"Policy");
  122. TEXTCONST(szPICSRulesExplanation,"Explanation");
  123. TEXTCONST(szPICSRulesRejectByURL,"RejectByURL");
  124. TEXTCONST(szPICSRulesAcceptByURL,"AcceptByURL");
  125. TEXTCONST(szPICSRulesRejectIf,"RejectIf");
  126. TEXTCONST(szPICSRulesAcceptIf,"AcceptIf");
  127. TEXTCONST(szPICSRulesAcceptUnless,"AcceptUnless");
  128. TEXTCONST(szPICSRulesRejectUnless,"RejectUnless");
  129. TEXTCONST(szPICSRulesName,"name");
  130. TEXTCONST(szPICSRulesRuleName,"Rulename");
  131. TEXTCONST(szPICSRulesDescription,"Description");
  132. TEXTCONST(szPICSRulesSource,"source");
  133. TEXTCONST(szPICSRulesSourceURL,"SourceURL");
  134. TEXTCONST(szPICSRulesCreationTool,"CreationTool");
  135. TEXTCONST(szPICSRulesAuthor,"author");
  136. TEXTCONST(szPICSRulesLastModified,"LastModified");
  137. TEXTCONST(szPICSRulesServiceInfo,"serviceinfo");
  138. TEXTCONST(szPICSRulesSIName,"Name");
  139. TEXTCONST(szPICSRulesShortName,"shortname");
  140. TEXTCONST(szPICSRulesBureauURL,"BureauURL");
  141. TEXTCONST(szPICSRulesUseEmbedded,"UseEmbedded");
  142. TEXTCONST(szPICSRulesRATFile,"Ratfile");
  143. TEXTCONST(szPICSRulesBureauUnavailable,"BureauUnavailable");
  144. TEXTCONST(szPICSRulesOptExtension,"optextension");
  145. TEXTCONST(szPICSRulesExtensionName,"extension-name");
  146. TEXTCONST(szPICSRulesReqExtension,"reqextension");
  147. TEXTCONST(szPICSRulesExtension,"Extension");
  148. TEXTCONST(szPICSRulesOptionDefault,"OptionDefault");
  149. TEXTCONST(szPICSRulesDegenerateExpression,"otherwise");
  150. TEXTCONST(szPICSRulesOr,"or");
  151. TEXTCONST(szPICSRulesAnd,"and");
  152. TEXTCONST(szPICSRulesHTTP,"http");
  153. TEXTCONST(szPICSRulesFTP,"ftp");
  154. TEXTCONST(szPICSRulesGOPHER,"gopher");
  155. TEXTCONST(szPICSRulesNNTP,"nntp");
  156. TEXTCONST(szPICSRulesIRC,"irc");
  157. TEXTCONST(szPICSRulesPROSPERO,"perospero");
  158. TEXTCONST(szPICSRulesTELNET,"telnet");
  159. TEXTCONST(szFINDSYSTEM,"http://www.microsoft.com/isapi/redir.dll?prd=ie&ar=ratings&pver=6");
  160. TEXTCONST(szTURNOFF,"WarnOnOff");
  161. TEXTCONST(szHINTVALUENAME, "Hint" );
  162. //These TEXTCONSTS are purposly obfucated to discourage those who would
  163. //from tampering with our settings in the registry
  164. //t-markh - BUGBUG - need to obfuscate names after debugging
  165. TEXTCONST(szPICSRULESSYSTEMNAME,"Name");
  166. TEXTCONST(szPICSRULESFILENAME,"FileName");
  167. TEXTCONST(szPICSRULESSYSTEMS,"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Ratings\\PICSRules");
  168. TEXTCONST(szPICSRULESNUMSYS,"NumSys");
  169. TEXTCONST(szPICSRULESVERMAJOR,"MajorVer");
  170. TEXTCONST(szPICSRULESVERMINOR,"MinorVer");
  171. TEXTCONST(szPICSRULESDWFLAGS,"dwFlags");
  172. TEXTCONST(szPICSRULESERRLINE,"errLine");
  173. TEXTCONST(szPICSRULESPRNAME,"PRName");
  174. TEXTCONST(szPICSRULESRULENAME,"RULEName");
  175. TEXTCONST(szPICSRULESDESCRIPTION,"Description");
  176. TEXTCONST(szPICSRULESPRSOURCE,"PRSource");
  177. TEXTCONST(szPICSRULESSOURCEURL,"SourceURL");
  178. TEXTCONST(szPICSRULESEXPRESSIONEMBEDDED,"PREEmbedded");
  179. TEXTCONST(szPICSRULESEXPRESSIONSERVICENAME,"PREServiceName");
  180. TEXTCONST(szPICSRULESEXPRESSIONCATEGORYNAME,"PRECategoryName");
  181. TEXTCONST(szPICSRULESEXPRESSIONFULLSERVICENAME,"PREFullServiceName");
  182. TEXTCONST(szPICSRULESEXPRESSIONVALUE,"PREValue");
  183. TEXTCONST(szPICSRULESEXPRESSIONPOLICYOPERATOR,"PREOperator");
  184. TEXTCONST(szPICSRULESEXPRESSIONOPPOLICYEMBEDDED,"PREPolEmbedded");
  185. TEXTCONST(szPICSRULESEXPRESSIONLEFT,"PREEmbeddedLeft");
  186. TEXTCONST(szPICSRULESEXPRESSIONRIGHT,"PREEmbeddedRight");
  187. TEXTCONST(szPICSRULESCREATIONTOOL,"PRCreationTool");
  188. TEXTCONST(szPICSRULESEMAILAUTHOR,"PREmailAuthor");
  189. TEXTCONST(szPICSRULESLASTMODIFIED,"PRLastModified");
  190. TEXTCONST(szPICSRULESPRPOLICY,"PRPolicy");
  191. TEXTCONST(szPICSRULESNUMPOLICYS,"PRNumPolicy");
  192. TEXTCONST(szPICSRULESPOLICYEXPLANATION,"PRPExplanation");
  193. TEXTCONST(szPICSRULESPOLICYATTRIBUTE,"PRPPolicyAttribute");
  194. TEXTCONST(szPICSRULESPOLICYSUB,"PRPPolicySub");
  195. TEXTCONST(szPICSRULESBYURLINTERNETPATTERN,"PRBUInternetPattern");
  196. TEXTCONST(szPICSRULESBYURLNONWILD,"PRBUNonWild");
  197. TEXTCONST(szPICSRULESBYURLSPECIFIED,"PRBUSpecified");
  198. TEXTCONST(szPICSRULESBYURLSCHEME,"PRBUScheme");
  199. TEXTCONST(szPICSRULESBYURLUSER,"PRBUUser");
  200. TEXTCONST(szPICSRULESBYURLHOST,"PRBUHost");
  201. TEXTCONST(szPICSRULESBYURLPORT,"PRBUPort");
  202. TEXTCONST(szPICSRULESBYURLPATH,"PRBUPath");
  203. TEXTCONST(szPICSRULESBYURLURL,"PRBUUrl");
  204. TEXTCONST(szPICSRULESSERVICEINFO,"PRServiceInfo");
  205. TEXTCONST(szPICSRULESNUMSERVICEINFO,"PRNumSI");
  206. TEXTCONST(szPICSRULESSIURLNAME,"PRSIURLName");
  207. TEXTCONST(szPICSRULESSIBUREAUURL,"PRSIBureauURL");
  208. TEXTCONST(szPICSRULESSISHORTNAME,"PRSIShortName");
  209. TEXTCONST(szPICSRULESSIRATFILE,"PRSIRatFile");
  210. TEXTCONST(szPICSRULESSIUSEEMBEDDED,"PRSIUseEmbedded");
  211. TEXTCONST(szPICSRULESSIBUREAUUNAVAILABLE,"PRSIBureauUnavailable");
  212. TEXTCONST(szPICSRULESNUMOPTEXTENSIONS,"PRNumOptExt");
  213. TEXTCONST(szPICSRULESOPTEXTNAME,"PROEName");
  214. TEXTCONST(szPICSRULESOPTEXTSHORTNAME,"PROEShortName");
  215. TEXTCONST(szPICSRULESNUMREQEXTENSIONS,"PRNumReqExt");
  216. TEXTCONST(szPICSRULESREQEXTNAME,"PRREName");
  217. TEXTCONST(szPICSRULESREQEXTSHORTNAME,"PRREShortName");
  218. TEXTCONST(szPICSRULESOPTEXTENSION,"PROptExt");
  219. TEXTCONST(szPICSRULESREQEXTENSION,"PRReqExt");
  220. TEXTCONST(szPICSRULESNUMBYURL,"PRNumURLExpressions");