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.

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