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.

144 lines
7.2 KiB

  1. //
  2. // Copyright (c) 1997-2001 Microsoft Corporation, All Rights Reserved
  3. //
  4. // ***************************************************************************
  5. //
  6. // Original Author: Rajesh Rao
  7. //
  8. // $Author: rajeshr $
  9. // $Date: 6/11/98 4:43p $
  10. // $Workfile:ldapproi.cpp $
  11. //
  12. // $Modtime: 6/11/98 11:21a $
  13. // $Revision: 1 $
  14. // $Nokeywords: $
  15. //
  16. //
  17. // Description: Contains implementation of the class that is used to initialize the
  18. // CLDAPClassProvider class
  19. //
  20. //***************************************************************************
  21. #include "precomp.h"
  22. //***************************************************************************
  23. //
  24. // CLDAPClassProviderInitializer::CLDAPClassProviderInitializer
  25. //
  26. // Constructor Parameters:
  27. // None
  28. //
  29. //
  30. //***************************************************************************
  31. CLDAPClassProviderInitializer :: CLDAPClassProviderInitializer ()
  32. {
  33. CLDAPClassProvider :: LDAP_BASE_CLASS_STR = SysAllocString(LDAP_BASE_CLASS);
  34. CLDAPClassProvider :: LDAP_CLASS_PROVIDER_NAME = SysAllocString(L"Microsoft|DSLDAPClassProvider|V1.0");
  35. CLDAPClassProvider :: LDAP_INSTANCE_PROVIDER_NAME = SysAllocString(L"Microsoft|DSLDAPInstanceProvider|V1.0");
  36. // WBEM Class Qualfiers
  37. CLDAPClassProvider :: DYNAMIC_BSTR = SysAllocString(L"dynamic");
  38. CLDAPClassProvider :: PROVIDER_BSTR = SysAllocString(L"provider");
  39. CLDAPClassProvider :: ABSTRACT_BSTR = SysAllocString(L"abstract");
  40. CLDAPClassProvider :: COMMON_NAME_ATTR_BSTR = SysAllocString(COMMON_NAME_ATTR);
  41. CLDAPClassProvider :: LDAP_DISPLAY_NAME_ATTR_BSTR = SysAllocString(LDAP_DISPLAY_NAME_ATTR);
  42. CLDAPClassProvider :: GOVERNS_ID_ATTR_BSTR = SysAllocString(GOVERNS_ID_ATTR);
  43. CLDAPClassProvider :: SCHEMA_ID_GUID_ATTR_BSTR = SysAllocString(SCHEMA_ID_GUID_ATTR);
  44. CLDAPClassProvider :: MAPI_DISPLAY_TYPE_ATTR_BSTR = SysAllocString(MAPI_DISPLAY_TYPE_ATTR);
  45. CLDAPClassProvider :: RDN_ATT_ID_ATTR_BSTR = SysAllocString(RDN_ATT_ID_ATTR);
  46. CLDAPClassProvider :: SYSTEM_MUST_CONTAIN_ATTR_BSTR = SysAllocString(SYSTEM_MUST_CONTAIN_ATTR);
  47. CLDAPClassProvider :: MUST_CONTAIN_ATTR_BSTR = SysAllocString(MUST_CONTAIN_ATTR);
  48. CLDAPClassProvider :: SYSTEM_MAY_CONTAIN_ATTR_BSTR = SysAllocString(SYSTEM_MAY_CONTAIN_ATTR);
  49. CLDAPClassProvider :: MAY_CONTAIN_ATTR_BSTR = SysAllocString(MAY_CONTAIN_ATTR);
  50. CLDAPClassProvider :: SYSTEM_POSS_SUPERIORS_ATTR_BSTR = SysAllocString(SYSTEM_POSS_SUPERIORS_ATTR);
  51. CLDAPClassProvider :: POSS_SUPERIORS_ATTR_BSTR = SysAllocString(POSS_SUPERIORS_ATTR);
  52. CLDAPClassProvider :: SYSTEM_AUXILIARY_CLASS_ATTR_BSTR = SysAllocString(SYSTEM_AUXILIARY_CLASS_ATTR);
  53. CLDAPClassProvider :: AUXILIARY_CLASS_ATTR_BSTR = SysAllocString(AUXILIARY_CLASS_ATTR);
  54. CLDAPClassProvider :: DEFAULT_SECURITY_DESCRP_ATTR_BSTR = SysAllocString(DEFAULT_SECURITY_DESCRP_ATTR);
  55. CLDAPClassProvider :: OBJECT_CLASS_CATEGORY_ATTR_BSTR = SysAllocString(OBJECT_CLASS_CATEGORY_ATTR);
  56. CLDAPClassProvider :: SYSTEM_ONLY_ATTR_BSTR = SysAllocString(SYSTEM_ONLY_ATTR);
  57. CLDAPClassProvider :: NT_SECURITY_DESCRIPTOR_ATTR_BSTR = SysAllocString(NT_SECURITY_DESCRIPTOR_ATTR);
  58. CLDAPClassProvider :: DEFAULT_OBJECTCATEGORY_ATTR_BSTR = SysAllocString(DEFAULT_OBJECTCATEGORY_ATTR);
  59. // WBEM Property Qualifiers
  60. CLDAPClassProvider :: SYSTEM_BSTR = SysAllocString(L"system");
  61. CLDAPClassProvider :: NOT_NULL_BSTR = SysAllocString(L"not_null");
  62. CLDAPClassProvider :: INDEXED_BSTR = SysAllocString(L"indexed");
  63. CLDAPClassProvider :: ATTRIBUTE_SYNTAX_ATTR_BSTR = SysAllocString(L"attributeSyntax");
  64. CLDAPClassProvider :: ATTRIBUTE_ID_ATTR_BSTR = SysAllocString(L"attributeID");
  65. CLDAPClassProvider :: MAPI_ID_ATTR_BSTR = SysAllocString(L"MAPI_ID");
  66. CLDAPClassProvider :: OM_SYNTAX_ATTR_BSTR = SysAllocString(L"OM_Syntax");
  67. CLDAPClassProvider :: RANGE_LOWER_ATTR_BSTR = SysAllocString(L"Range_Lower");
  68. CLDAPClassProvider :: RANGE_UPPER_ATTR_BSTR = SysAllocString(L"Range_Upper");
  69. CLDAPClassProvider :: CIMTYPE_STR = SysAllocString(L"Cimtype");
  70. CLDAPClassProvider :: EMBED_UINT8ARRAY = SysAllocString(L"object:Uint8Array");
  71. CLDAPClassProvider :: EMBED_DN_WITH_STRING = SysAllocString(L"object:DN_With_String");
  72. CLDAPClassProvider :: EMBED_DN_WITH_BINARY = SysAllocString(L"object:DN_WIth_Binary");
  73. // WBEM Property names
  74. CLDAPClassProvider :: DYNASTY_BSTR = SysAllocString(L"__DYNASTY");
  75. // The property cache
  76. CLDAPClassProvider :: s_pLDAPCache = new CLDAPCache();
  77. }
  78. //***************************************************************************
  79. //
  80. // CLDAPClassProviderInitializer::CLDAPClassProviderInitializer
  81. //
  82. // Destructor
  83. //
  84. //***************************************************************************
  85. CLDAPClassProviderInitializer :: ~CLDAPClassProviderInitializer ()
  86. {
  87. SysFreeString(CLDAPClassProvider::LDAP_BASE_CLASS_STR);
  88. SysFreeString(CLDAPClassProvider::LDAP_CLASS_PROVIDER_NAME);
  89. SysFreeString(CLDAPClassProvider::LDAP_INSTANCE_PROVIDER_NAME);
  90. // Class Qualifiers
  91. SysFreeString(CLDAPClassProvider::DYNAMIC_BSTR);
  92. SysFreeString(CLDAPClassProvider::PROVIDER_BSTR);
  93. SysFreeString(CLDAPClassProvider::ABSTRACT_BSTR);
  94. SysFreeString(CLDAPClassProvider::COMMON_NAME_ATTR_BSTR);
  95. SysFreeString(CLDAPClassProvider::LDAP_DISPLAY_NAME_ATTR_BSTR);
  96. SysFreeString(CLDAPClassProvider::GOVERNS_ID_ATTR_BSTR);
  97. SysFreeString(CLDAPClassProvider::SCHEMA_ID_GUID_ATTR_BSTR);
  98. SysFreeString(CLDAPClassProvider::MAPI_DISPLAY_TYPE_ATTR_BSTR);
  99. SysFreeString(CLDAPClassProvider::RDN_ATT_ID_ATTR_BSTR);
  100. SysFreeString(CLDAPClassProvider::SYSTEM_MUST_CONTAIN_ATTR_BSTR);
  101. SysFreeString(CLDAPClassProvider::MUST_CONTAIN_ATTR_BSTR);
  102. SysFreeString(CLDAPClassProvider::SYSTEM_MAY_CONTAIN_ATTR_BSTR);
  103. SysFreeString(CLDAPClassProvider::MAY_CONTAIN_ATTR_BSTR);
  104. SysFreeString(CLDAPClassProvider::SYSTEM_POSS_SUPERIORS_ATTR_BSTR);
  105. SysFreeString(CLDAPClassProvider::POSS_SUPERIORS_ATTR_BSTR);
  106. SysFreeString(CLDAPClassProvider::SYSTEM_AUXILIARY_CLASS_ATTR_BSTR);
  107. SysFreeString(CLDAPClassProvider::AUXILIARY_CLASS_ATTR_BSTR);
  108. SysFreeString(CLDAPClassProvider::DEFAULT_SECURITY_DESCRP_ATTR_BSTR);
  109. SysFreeString(CLDAPClassProvider::OBJECT_CLASS_CATEGORY_ATTR_BSTR);
  110. SysFreeString(CLDAPClassProvider::SYSTEM_ONLY_ATTR_BSTR);
  111. SysFreeString(CLDAPClassProvider::NT_SECURITY_DESCRIPTOR_ATTR_BSTR);
  112. SysFreeString(CLDAPClassProvider::DEFAULT_OBJECTCATEGORY_ATTR_BSTR);
  113. // Property Qualifiers
  114. SysFreeString(CLDAPClassProvider::SYSTEM_BSTR);
  115. SysFreeString(CLDAPClassProvider::NOT_NULL_BSTR);
  116. SysFreeString(CLDAPClassProvider::INDEXED_BSTR);
  117. SysFreeString(CLDAPClassProvider::ATTRIBUTE_SYNTAX_ATTR_BSTR);
  118. SysFreeString(CLDAPClassProvider::ATTRIBUTE_ID_ATTR_BSTR);
  119. SysFreeString(CLDAPClassProvider::MAPI_ID_ATTR_BSTR);
  120. SysFreeString(CLDAPClassProvider::OM_SYNTAX_ATTR_BSTR);
  121. SysFreeString(CLDAPClassProvider::RANGE_LOWER_ATTR_BSTR);
  122. SysFreeString(CLDAPClassProvider::RANGE_UPPER_ATTR_BSTR);
  123. SysFreeString(CLDAPClassProvider::CIMTYPE_STR);
  124. SysFreeString(CLDAPClassProvider::EMBED_UINT8ARRAY);
  125. SysFreeString(CLDAPClassProvider::EMBED_DN_WITH_STRING);
  126. SysFreeString(CLDAPClassProvider::EMBED_DN_WITH_BINARY);
  127. // WBEM Property names
  128. SysFreeString(CLDAPClassProvider::DYNASTY_BSTR);
  129. // The property cache
  130. delete CLDAPClassProvider :: s_pLDAPCache;
  131. }