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.

253 lines
5.5 KiB

  1. typedef struct _PropertyInfo
  2. {
  3. LPTSTR szPropertyName;
  4. BSTR bstrOID;
  5. BSTR bstrSyntax;
  6. long lMaxRange;
  7. long lMinRange;
  8. BOOL fMultiValued;
  9. DWORD dwFlags;
  10. DWORD dwInfoLevel;
  11. DWORD dwSyntaxId;
  12. }PROPERTYINFO, *PPROPERTYINFO, *LPPROPERTYINFO;
  13. typedef struct _ClassInfo
  14. {
  15. BSTR bstrName;
  16. const GUID *pCLSID;
  17. const GUID *pPrimaryInterfaceGUID;
  18. BSTR bstrOID;
  19. BOOL fAbstract;
  20. BSTR bstrMandatoryProperties;
  21. BSTR bstrOptionalProperties;
  22. BSTR bstrPossSuperiors;
  23. BSTR bstrContainment;
  24. BOOL fContainer;
  25. BSTR bstrHelpFileName;
  26. long lHelpFileContext;
  27. PROPERTYINFO *aPropertyInfo;
  28. DWORD cPropertyInfo;
  29. } CLASSINFO;
  30. typedef struct _SyntaxInfo
  31. {
  32. BSTR bstrName;
  33. long lOleAutoDataType;
  34. } SYNTAXINFO;
  35. extern DWORD g_cNWCOMPATClasses;
  36. extern CLASSINFO g_aNWCOMPATClasses[];
  37. extern DWORD g_cNWCOMPATSyntax;
  38. extern SYNTAXINFO g_aNWCOMPATSyntax[];
  39. HRESULT MakeVariantFromStringList(
  40. BSTR bstrList,
  41. VARIANT *pvVariant );
  42. class CNWCOMPATSchema;
  43. class CNWCOMPATSchema : INHERIT_TRACKING,
  44. public CCoreADsObject,
  45. public ISupportErrorInfo,
  46. public IADs,
  47. public IADsContainer
  48. {
  49. public:
  50. /* IUnknown methods */
  51. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  52. DECLARE_STD_REFCOUNTING
  53. /* Other methods */
  54. DECLARE_IDispatch_METHODS
  55. NW_DECLARE_ISupportErrorInfo_METHODS
  56. DECLARE_IADs_METHODS
  57. DECLARE_IADsContainer_METHODS
  58. /* Constructors, Destructors .... */
  59. CNWCOMPATSchema::CNWCOMPATSchema();
  60. CNWCOMPATSchema::~CNWCOMPATSchema();
  61. static HRESULT CNWCOMPATSchema::CreateSchema(
  62. BSTR bstrParent,
  63. BSTR bstrName,
  64. CCredentials &Credentials,
  65. DWORD dwObjectState,
  66. REFIID riid,
  67. void **ppvObj );
  68. static HRESULT CNWCOMPATSchema::AllocateSchemaObject(
  69. CNWCOMPATSchema **ppSchema );
  70. protected:
  71. CDispatchMgr FAR * _pDispMgr;
  72. VARIANT _vFilter;
  73. CCredentials _Credentials;
  74. };
  75. class CNWCOMPATClass : INHERIT_TRACKING,
  76. public CCoreADsObject,
  77. public ISupportErrorInfo,
  78. public IADsClass
  79. {
  80. public:
  81. /* IUnknown methods */
  82. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  83. DECLARE_STD_REFCOUNTING
  84. /* Other methods */
  85. DECLARE_IDispatch_METHODS
  86. NW_DECLARE_ISupportErrorInfo_METHODS
  87. DECLARE_IADs_METHODS
  88. DECLARE_IADsClass_METHODS
  89. /* Constructors, Destructors, .... */
  90. CNWCOMPATClass::CNWCOMPATClass();
  91. CNWCOMPATClass::~CNWCOMPATClass();
  92. static HRESULT CNWCOMPATClass::CreateClass(
  93. BSTR bstrParent,
  94. CLASSINFO *pClassInfo,
  95. DWORD dwObjectState,
  96. REFIID riid,
  97. void **ppvObj );
  98. static HRESULT CNWCOMPATClass::AllocateClassObject(
  99. CNWCOMPATClass **ppClass );
  100. protected:
  101. CDispatchMgr FAR * _pDispMgr;
  102. VARIANT _vFilter;
  103. DWORD _cPropertyInfo;
  104. PROPERTYINFO *_aPropertyInfo;
  105. /* Properties */
  106. BSTR _bstrCLSID;
  107. BSTR _bstrOID;
  108. BSTR _bstrPrimaryInterface;
  109. VARIANT_BOOL _fAbstract;
  110. VARIANT _vMandatoryProperties;
  111. VARIANT _vOptionalProperties;
  112. VARIANT _vPossSuperiors;
  113. VARIANT _vContainment;
  114. VARIANT_BOOL _fContainer;
  115. BSTR _bstrHelpFileName;
  116. long _lHelpFileContext;
  117. };
  118. class CNWCOMPATProperty : INHERIT_TRACKING,
  119. public CCoreADsObject,
  120. public ISupportErrorInfo,
  121. public IADsProperty
  122. {
  123. public:
  124. /* IUnknown methods */
  125. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  126. DECLARE_STD_REFCOUNTING
  127. /* Other methods */
  128. DECLARE_IDispatch_METHODS
  129. NW_DECLARE_ISupportErrorInfo_METHODS
  130. DECLARE_IADs_METHODS
  131. DECLARE_IADsProperty_METHODS
  132. /* Constructors, Destructors, ... */
  133. CNWCOMPATProperty::CNWCOMPATProperty();
  134. CNWCOMPATProperty::~CNWCOMPATProperty();
  135. static HRESULT CNWCOMPATProperty::CreateProperty(
  136. BSTR bstrParent,
  137. PROPERTYINFO *pPropertyInfo,
  138. DWORD dwObjectState,
  139. REFIID riid,
  140. void **ppvObj );
  141. static HRESULT CNWCOMPATProperty::AllocatePropertyObject(
  142. CNWCOMPATProperty **ppProperty );
  143. protected:
  144. CDispatchMgr FAR * _pDispMgr;
  145. /* Properties */
  146. BSTR _bstrOID;
  147. BSTR _bstrSyntax;
  148. long _lMaxRange;
  149. long _lMinRange;
  150. VARIANT_BOOL _fMultiValued;
  151. };
  152. class CNWCOMPATSyntax : INHERIT_TRACKING,
  153. public CCoreADsObject,
  154. public ISupportErrorInfo,
  155. public IADsSyntax
  156. {
  157. public:
  158. /* IUnknown methods */
  159. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  160. DECLARE_STD_REFCOUNTING
  161. /* Other methods */
  162. DECLARE_IDispatch_METHODS
  163. NW_DECLARE_ISupportErrorInfo_METHODS
  164. DECLARE_IADs_METHODS
  165. DECLARE_IADsSyntax_METHODS
  166. /* Constructors, Destructors, ... */
  167. CNWCOMPATSyntax::CNWCOMPATSyntax();
  168. CNWCOMPATSyntax::~CNWCOMPATSyntax();
  169. static HRESULT CNWCOMPATSyntax::CreateSyntax(
  170. BSTR bstrParent,
  171. SYNTAXINFO *pSyntaxInfo,
  172. DWORD dwObjectState,
  173. REFIID riid,
  174. void **ppvObj );
  175. static HRESULT CNWCOMPATSyntax::AllocateSyntaxObject(
  176. CNWCOMPATSyntax **ppSyntax );
  177. protected:
  178. CDispatchMgr FAR * _pDispMgr;
  179. /* Properties */
  180. long _lOleAutoDataType;
  181. };