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.

184 lines
6.6 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995
  5. //
  6. // File: globals.cxx
  7. //
  8. // Contents:
  9. //
  10. // History:
  11. //----------------------------------------------------------------------------
  12. #include "nds.hxx"
  13. #pragma hdrstop
  14. WCHAR *szProviderName = L"NDS";
  15. KWDLIST KeywordList[MAX_KEYWORDS] =
  16. {
  17. { TOKEN_DOMAIN, L"domain"},
  18. { TOKEN_USER, L"user"},
  19. { TOKEN_GROUP, L"group"},
  20. { TOKEN_COMPUTER, L"computer"},
  21. { TOKEN_PRINTER, L"printqueue"},
  22. { TOKEN_SERVICE, L"service"},
  23. { TOKEN_FILESERVICE, L"fileservice"},
  24. { TOKEN_SCHEMA, L"schema"},
  25. { TOKEN_CLASS, L"class"},
  26. { TOKEN_FUNCTIONALSET, L"functionalset"},
  27. { TOKEN_FUNCTIONALSETALIAS, L"functionalsetalias"},
  28. { TOKEN_PROPERTY, L"property"},
  29. { TOKEN_SYNTAX, L"syntax"},
  30. { TOKEN_FILESHARE, L"fileshare"}
  31. };
  32. CClassCache * pgClassCache;
  33. SYNTAXMAP g_aNDSSyntaxMap[] =
  34. {
  35. /* 0 */
  36. { TEXT("Unmappable"), TEXT("Unknown"), VT_UNKNOWN},
  37. /* 1 */
  38. { TEXT("String"), TEXT("NDS Distinguished Name"), VT_BSTR},
  39. /* 2 */
  40. { TEXT("String"), TEXT("NDS Case Exact String"), VT_BSTR},
  41. /* 3 */
  42. { TEXT("String"), TEXT("NDS Case Ignore String"), VT_BSTR},
  43. /* 4 */
  44. { TEXT("String"), TEXT("NDS Printable String"), VT_BSTR},
  45. /* 5 */
  46. { TEXT("String"), TEXT("NDS Numeric String"), VT_BSTR},
  47. /* 6 */
  48. { TEXT("Case Ignore List"), TEXT("NDS Case Ignore List"), VT_VARIANT},
  49. /* 7 */
  50. { TEXT("Boolean"), TEXT("NDS Boolean"), VT_BOOL},
  51. /* 8 */
  52. { TEXT("Integer"), TEXT("NDS Integer"), VT_I4},
  53. /* 9 */
  54. { TEXT("Octet"), TEXT("NDS Octet String"), VT_VARIANT},
  55. /* 10 */
  56. { TEXT("String"), TEXT("NDS Telephone Number"), VT_BSTR},
  57. /* 11 */
  58. { TEXT("FaxNumber"), TEXT("NDS Facsimile Number"), VT_DISPATCH},
  59. /* 12 */
  60. { TEXT("NetAddress"), TEXT("NDS Network Address"), VT_DISPATCH},
  61. /* 13 */
  62. { TEXT("Octet List"), TEXT("NDS Octet List"), VT_VARIANT},
  63. /* 14 */
  64. { TEXT("Email"), TEXT("NDS Email Address"), VT_DISPATCH},
  65. /* 15 */
  66. { TEXT("Path"), TEXT("NDS Path"), VT_DISPATCH},
  67. /* 16 */
  68. { TEXT("Replica Pointer"), TEXT("Replica Pointer"), VT_DISPATCH},
  69. /* 17 */
  70. { TEXT("ACL"), TEXT("NDS Object ACL"), VT_DISPATCH},
  71. /* 18 */
  72. { TEXT("Postal Address"), TEXT("NDS Postal Address"), VT_DISPATCH},
  73. /* 19 */
  74. { TEXT("Timestamp"), TEXT("NDS Timestamp"), VT_DISPATCH},
  75. /* 20 */
  76. { TEXT("Object Class"), TEXT("NDS Class Name"), VT_BSTR},
  77. /* 21 */
  78. { TEXT("Octet"), TEXT("NDS Stream"), VT_VARIANT},
  79. /* 22 */
  80. { TEXT("Integer"), TEXT("NDS Counter"), VT_I4},
  81. /* 23 */
  82. { TEXT("Back Link"), TEXT("NDS Back Link"), VT_DISPATCH},
  83. /* 24 */
  84. { TEXT("Time"), TEXT("NDS Time"), VT_DATE},
  85. /* 25 */
  86. { TEXT("Typed Name"), TEXT("NDS Typed Name"), VT_DISPATCH},
  87. /* 26 */
  88. { TEXT("Hold"), TEXT("NDS Hold"), VT_DISPATCH},
  89. /* 27 */
  90. { TEXT("Integer"), TEXT("NDS Interval"), VT_I4}
  91. };
  92. DWORD g_cNDSSyntaxMap = (sizeof(g_aNDSSyntaxMap)/sizeof(g_aNDSSyntaxMap[0]));
  93. SYNTAXINFO g_aNDSSyntax[] =
  94. {
  95. { TEXT("String"), VT_BSTR},
  96. { TEXT("Case Ignore List"), VT_VARIANT},
  97. { TEXT("Boolean"), VT_BOOL},
  98. { TEXT("Octet"), VT_VARIANT},
  99. { TEXT("FaxNumber"),VT_DISPATCH},
  100. { TEXT("NetAddress"), VT_DISPATCH},
  101. { TEXT("Octet List"), VT_VARIANT},
  102. { TEXT("Email"), VT_DISPATCH},
  103. { TEXT("Path"), VT_DISPATCH},
  104. { TEXT("Replica Pointer"), VT_DISPATCH},
  105. { TEXT("ACL"), VT_DISPATCH},
  106. { TEXT("Postal Address"), VT_DISPATCH},
  107. { TEXT("Timestamp"), VT_DISPATCH},
  108. { TEXT("Object Class"), VT_BSTR},
  109. { TEXT("Back Link"), VT_DISPATCH},
  110. { TEXT("Time"), VT_DATE},
  111. { TEXT("Typed Name"), VT_DISPATCH},
  112. { TEXT("Hold"), VT_DISPATCH},
  113. { TEXT("Integer"), VT_I4}
  114. };
  115. DWORD g_cNDSSyntax = (sizeof(g_aNDSSyntax)/sizeof(g_aNDSSyntax[0]));
  116. ADSTYPE g_MapNdsTypeToADsType[] = {
  117. ADSTYPE_INVALID, /* Unknown */
  118. ADSTYPE_DN_STRING, /* Distinguished Name */
  119. ADSTYPE_CASE_EXACT_STRING, /* Case Exact String */
  120. ADSTYPE_CASE_IGNORE_STRING, /* Case Ignore String */
  121. ADSTYPE_PRINTABLE_STRING, /* Printable String */
  122. ADSTYPE_NUMERIC_STRING, /* Numeric String */
  123. ADSTYPE_CASEIGNORE_LIST, /* Case Ignore List */
  124. ADSTYPE_BOOLEAN, /* Boolean */
  125. ADSTYPE_INTEGER, /* Integer */
  126. ADSTYPE_OCTET_STRING, /* Octet String */
  127. ADSTYPE_CASE_IGNORE_STRING, /* Telephone Number */
  128. ADSTYPE_FAXNUMBER, /* Facsimile Telephone Number */
  129. ADSTYPE_NETADDRESS, /* Net Address */
  130. ADSTYPE_OCTET_LIST, /* Octet List */
  131. ADSTYPE_EMAIL, /* EMail Address */
  132. ADSTYPE_PATH, /* Path */
  133. ADSTYPE_REPLICAPOINTER, /* Replica Pointer */
  134. ADSTYPE_PROV_SPECIFIC, /* Object ACL */
  135. ADSTYPE_POSTALADDRESS, /* Postal Address */
  136. ADSTYPE_TIMESTAMP, /* Timestamp */
  137. ADSTYPE_OBJECT_CLASS, /* Class Name */
  138. ADSTYPE_OCTET_STRING, /* Stream */
  139. ADSTYPE_INTEGER, /* Counter */
  140. ADSTYPE_BACKLINK, /* Back Link */
  141. ADSTYPE_UTC_TIME, /* Time */
  142. ADSTYPE_TYPEDNAME, /* Typed Name */
  143. ADSTYPE_HOLD, /* Hold */
  144. ADSTYPE_INTEGER /* Interval */
  145. };
  146. DWORD g_cMapNdsTypeToADsType = (sizeof(g_MapNdsTypeToADsType)/sizeof(g_MapNdsTypeToADsType[0]));