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.

188 lines
8.6 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 2000.
  5. //
  6. // File: umiglob.cxx
  7. //
  8. // Contents: Contains definition of UMI global variables
  9. //
  10. // History: 02-28-00 SivaramR Created.
  11. //
  12. //----------------------------------------------------------------------------
  13. #include "winnt.hxx"
  14. UMI_TYPE g_mapNTTypeToUmiType[] = {
  15. UMI_TYPE_NULL, // no NT_SYNTAX value of 0
  16. UMI_TYPE_BOOL, // NT_SYNTAX_ID_BOOL
  17. UMI_TYPE_SYSTEMTIME, // NT_SYNTAX_ID_SYSTEMTIME
  18. UMI_TYPE_I4, // NT_SYNTAX_ID_DWORD
  19. UMI_TYPE_LPWSTR, // NT_SYNTAX_ID_LPTSTR
  20. UMI_TYPE_LPWSTR, // NT_SYNTAX_ID_DelimitedString
  21. UMI_TYPE_LPWSTR, // NT_SYNTAX_ID_NulledString
  22. UMI_TYPE_SYSTEMTIME, // NT_SYNTAX_ID_DATE
  23. UMI_TYPE_SYSTEMTIME, // NT_SYNTAX_ID_DATE_1970
  24. UMI_TYPE_OCTETSTRING, // NT_SYNTAX_ID_OCTETSTRING
  25. UMI_TYPE_LPWSTR // NT_SYNTAX_ID_EncryptedString
  26. };
  27. DWORD g_dwNumNTTypes = sizeof(g_mapNTTypeToUmiType) /
  28. sizeof(g_mapNTTypeToUmiType[0]);
  29. ADSIToUMI g_IADsProps[] =
  30. { { TEXT("ADsPath"), TEXT(UMIOBJ_INTF_PROP_PATH) },
  31. { TEXT("Class"), TEXT(UMIOBJ_INTF_PROP_CLASS) },
  32. { TEXT("Name"), TEXT(UMIOBJ_INTF_PROP_NAME) },
  33. { TEXT("Parent"), TEXT(UMIOBJ_INTF_PROP_PARENT) },
  34. { TEXT("Schema"), TEXT(UMIOBJ_INTF_PROP_SCHEMA) }
  35. };
  36. DWORD g_dwIADsProperties = sizeof(g_IADsProps) / sizeof(ADSIToUMI);
  37. #define UMI_MAX_STRLEN 1024
  38. #define UMI_MAX_LONG 0x7fffffff
  39. // interface properties on IUmiObject.
  40. PROPERTYINFO ObjClass[] =
  41. { { TEXT(UMIOBJ_INTF_PROP_PATH), TEXT(""), TEXT("String"),
  42. UMI_MAX_STRLEN, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  43. { TEXT(UMIOBJ_INTF_PROP_CLASS), TEXT(""), TEXT("String"),
  44. UMI_MAX_STRLEN, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  45. { TEXT(UMIOBJ_INTF_PROP_NAME), TEXT(""), TEXT("String"),
  46. UMI_MAX_STRLEN, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  47. { TEXT(UMIOBJ_INTF_PROP_PARENT), TEXT(""), TEXT("String"),
  48. UMI_MAX_STRLEN, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  49. { TEXT(UMIOBJ_INTF_PROP_SCHEMA), TEXT(""), TEXT("String"),
  50. UMI_MAX_STRLEN, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  51. { TEXT(UMIOBJ_INTF_PROP_RELURL), TEXT(""), TEXT("String"),
  52. UMI_MAX_STRLEN, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  53. { TEXT(UMIOBJ_INTF_PROP_FULLURL), TEXT(""), TEXT("String"),
  54. UMI_MAX_STRLEN, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  55. { TEXT(UMIOBJ_INTF_PROP_URL), TEXT(""), TEXT("String"),
  56. UMI_MAX_STRLEN, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  57. { TEXT(UMIOBJ_INTF_PROP_RELPATH), TEXT(""), TEXT("String"),
  58. UMI_MAX_STRLEN, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  59. { TEXT(UMIOBJ_INTF_PROP_GENUS), TEXT(""), TEXT("Integer"),
  60. UMI_MAX_LONG, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_DWORD },
  61. { TEXT(UMIOBJ_INTF_PROP_SCHEMAPATH), TEXT(""), TEXT("String"),
  62. UMI_MAX_STRLEN, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  63. { TEXT(UMIOBJ_INTF_PROP_KEY), TEXT(""), TEXT("String"),
  64. UMI_MAX_STRLEN, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  65. { TEXT(UMIOBJ_INTF_PROP_SUPERCLASS), TEXT(""), TEXT("String"),
  66. UMI_MAX_STRLEN, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  67. { TEXT(UMIOBJ_INTF_PROP_FULLRELURL), TEXT(""), TEXT("String"),
  68. UMI_MAX_STRLEN, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  69. { TEXT(UMIOBJ_INTF_PROP_PROPERTY_COUNT), TEXT(""), TEXT("String"),
  70. UMI_MAX_STRLEN, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR }
  71. };
  72. DWORD g_dwObjClassSize = sizeof(ObjClass)/sizeof(PROPERTYINFO);
  73. // interface properties on IUmiCOnnection.
  74. PROPERTYINFO ConnectionClass[] =
  75. { { TEXT(CONN_INTF_PROP_USERNAME), TEXT(""), TEXT("String"), UMI_MAX_STRLEN,
  76. 0, FALSE, PROPERTY_RW, 0, NT_SYNTAX_ID_LPTSTR },
  77. { TEXT(CONN_INTF_PROP_PASSWORD), TEXT(""), TEXT("String"), UMI_MAX_STRLEN,
  78. 0, FALSE, PROPERTY_RW, 0, NT_SYNTAX_ID_EncryptedString },
  79. { TEXT(CONN_INTF_PROP_SECURE_AUTH), TEXT(""), TEXT("Boolean"), 1, 0,
  80. FALSE, PROPERTY_RW, 0, NT_SYNTAX_ID_BOOL },
  81. { TEXT(CONN_INTF_PROP_READONLY_SERVER), TEXT(""), TEXT("Boolean"), 1, 0,
  82. FALSE, PROPERTY_RW, 0, NT_SYNTAX_ID_BOOL }
  83. };
  84. DWORD g_dwConnectionTableSize = sizeof(ConnectionClass) /
  85. sizeof(PROPERTYINFO);
  86. PROPERTYINFO CursorClass[] =
  87. { { TEXT(CURSOR_INTF_PROP_FILTER), TEXT(""), TEXT("String"), UMI_MAX_STRLEN, 0, TRUE, PROPERTY_RW, 0, NT_SYNTAX_ID_LPTSTR }
  88. };
  89. DWORD g_dwCursorTableSize = sizeof(CursorClass) /
  90. sizeof(PROPERTYINFO);
  91. PROPERTYINFO SchClassClass[] =
  92. { { TEXT("PrimaryInterface"), TEXT(""), TEXT("String"), UMI_MAX_STRLEN, 0,
  93. FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  94. { TEXT("CLSID"), TEXT(""), TEXT("String"), UMI_MAX_STRLEN, 0,
  95. FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  96. { TEXT("OID"), TEXT(""), TEXT("String"), UMI_MAX_STRLEN, 0,
  97. FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  98. { TEXT("Abstract"), TEXT(""), TEXT("Boolean"), 1, 0, FALSE,
  99. PROPERTY_READABLE, 0, NT_SYNTAX_ID_BOOL },
  100. { TEXT("Auxiliary"), TEXT(""), TEXT("Boolean"), 1, 0, FALSE,
  101. PROPERTY_READABLE, 0, NT_SYNTAX_ID_BOOL },
  102. { TEXT("MandatoryProperties"), TEXT(""), TEXT("String"), UMI_MAX_STRLEN,
  103. 0, TRUE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  104. { TEXT("OptionalProperties"), TEXT(""), TEXT("String"), UMI_MAX_STRLEN,
  105. 0, TRUE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  106. { TEXT("PossibleSuperiors"), TEXT(""), TEXT("String"), UMI_MAX_STRLEN,
  107. 0, TRUE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  108. { TEXT("Containment"), TEXT(""), TEXT("String"), UMI_MAX_STRLEN,
  109. 0, TRUE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  110. { TEXT("Container"), TEXT(""), TEXT("Boolean"), 1, 0, FALSE,
  111. PROPERTY_READABLE, 0, NT_SYNTAX_ID_BOOL },
  112. { TEXT("HelpFileName"), TEXT(""), TEXT("String"), UMI_MAX_STRLEN, 0,
  113. FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  114. { TEXT("HelpFileContext"), TEXT(""), TEXT("Integer"),
  115. UMI_MAX_LONG, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_DWORD },
  116. { TEXT("Name"), TEXT(""), TEXT("String"), UMI_MAX_STRLEN, 0,
  117. FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR }
  118. };
  119. DWORD g_dwSchClassClassTableSize = sizeof(SchClassClass)/sizeof(PROPERTYINFO);
  120. PROPERTYINFO PropertyClass[] =
  121. { { TEXT("OID"), TEXT(""), TEXT("String"), UMI_MAX_STRLEN, 0,
  122. FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  123. { TEXT("Syntax"), TEXT(""), TEXT("String"), UMI_MAX_STRLEN, 0,
  124. FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR },
  125. { TEXT("MaxRange"), TEXT(""), TEXT("Integer"),
  126. UMI_MAX_LONG, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_DWORD },
  127. { TEXT("MinRange"), TEXT(""), TEXT("Integer"),
  128. UMI_MAX_LONG, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_DWORD },
  129. { TEXT("Multivalued"), TEXT(""), TEXT("Boolean"), 1, 0, FALSE,
  130. PROPERTY_READABLE, 0, NT_SYNTAX_ID_BOOL },
  131. { TEXT("Name"), TEXT(""), TEXT("String"), UMI_MAX_STRLEN, 0,
  132. FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR }
  133. };
  134. DWORD g_dwPropertyClassTableSize = sizeof(PropertyClass)/sizeof(PROPERTYINFO);
  135. PROPERTYINFO SyntaxClass[] =
  136. { { TEXT("OleAutoDataType"), TEXT(""), TEXT("Integer"),
  137. UMI_MAX_LONG, 0, FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_DWORD },
  138. { TEXT("Name"), TEXT(""), TEXT("String"), UMI_MAX_STRLEN, 0,
  139. FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR }
  140. };
  141. DWORD g_dwSyntaxTableSize = sizeof(SyntaxClass)/sizeof(PROPERTYINFO);
  142. PROPERTYINFO SchemaClass[] =
  143. { { TEXT("Name"), TEXT(""), TEXT("String"), UMI_MAX_STRLEN, 0,
  144. FALSE, PROPERTY_READABLE, 0, NT_SYNTAX_ID_LPTSTR }
  145. };
  146. DWORD g_dwSchemaClassTableSize = sizeof(SchemaClass)/sizeof(PROPERTYINFO);
  147. // Unimplemented standard interface properties on IUmiObject
  148. LPWSTR g_UmiObjUnImplProps[] =
  149. { L"__GUIDURL",
  150. L"__SECURITY_DESCRIPTOR",
  151. L"__SD_ACCESS",
  152. L"__TIME_MODIFIED",
  153. L"__TIME_CREATED",
  154. L"__GUID",
  155. NULL
  156. };
  157. // Unimplemented standard interface properties on IUmiConnection
  158. LPWSTR g_UmiConUnImplProps[] =
  159. { L"__TIMEOUT",
  160. L"__ENCRYPTION_METHOD",
  161. L"__NO_AUTHENTICATION",
  162. NULL
  163. };