CCLSOBJ.H
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:2k
源码类别:

Windows编程

开发平台:

Visual C++

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4.     CClsObj.h
  5. Abstract:
  6. Author:
  7. Environment:
  8.     User mode
  9. Revision History :
  10. --*/
  11. #ifndef _CCLSOBJ_H_
  12. #define _CCLSOBJ_H_
  13. typedef struct _propentry{
  14.     DWORD dwSyntaxId;
  15.     LPWSTR pszPropName;
  16.     struct _propentry *pNext;
  17. } PROPENTRY, *PPROPENTRY;
  18. #define SampleDS_CONTAINER_CLASS               0x01
  19. #define SampleDS_EFFECTIVE_CLASS               0x02
  20. #define SampleDS_NONREMOVABLE_CLASS            0x04
  21. #define SampleDS_AMBIGUOUS_NAMING              0x08
  22. #define SampleDS_AMBIGUOUS_CONTAINMENT         0x10
  23. class CSampleDSClass;
  24. class CSampleDSClass : INHERIT_TRACKING,
  25.                      public CCoreADsObject,
  26.                      public IADsClass
  27. {
  28. public:
  29.     /* IUnknown methods */
  30.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  31.     DECLARE_STD_REFCOUNTING
  32.     DECLARE_IDispatch_METHODS
  33.     DECLARE_IADs_METHODS
  34.     DECLARE_IADsClass_METHODS
  35.     CSampleDSClass::CSampleDSClass();
  36.     CSampleDSClass::~CSampleDSClass();
  37.     static
  38.     HRESULT
  39.     CSampleDSClass::CreateClass(
  40.         BSTR Parent,
  41.         BSTR CommonName,
  42.         LPSampleDS_CLASS_DEF lpClassDefs,
  43.         DWORD dwObjectState,
  44.         REFIID riid,
  45.         void **ppvObj
  46.         );
  47.     static
  48.     HRESULT
  49.     CSampleDSClass::CreateClass(
  50.         BSTR Parent,
  51.         BSTR CommonName,
  52.         HANDLE hTree,
  53.         DWORD dwObjectState,
  54.         REFIID riid,
  55.         void **ppvObj
  56.         );
  57.     
  58.     static
  59.     HRESULT
  60.     CSampleDSClass::AllocateClassObject(
  61.         CSampleDSClass ** ppClass
  62.         );
  63.     STDMETHOD(GetInfo)(
  64.         THIS_ DWORD dwApiLevel,
  65.         BOOL fExplicit
  66.         );
  67. protected:
  68.     VARIANT     _vFilter;
  69.     LPWSTR      _lpClassName;
  70.     DWORD       _dwNumberOfMandatoryAttributes;
  71.     PPROPENTRY  _lpMandatoryAttributes;
  72.     CDispatchMgr FAR * _pDispMgr;
  73. };
  74. PPROPENTRY
  75. CreatePropertyList(
  76.     LPWSTR_LIST  lpStringList
  77.     );
  78. PPROPENTRY
  79. CreatePropertyEntry(
  80.     LPWSTR pszPropertyName,
  81.     DWORD dwSyntaxId
  82.     );
  83. void
  84. FreePropertyEntry(
  85.     PPROPENTRY pPropName
  86.     );
  87. HRESULT
  88. MakeVariantFromPropList(
  89.     PPROPENTRY pPropList,
  90.     DWORD dwNumEntries,
  91.     VARIANT * pVarList
  92.     );
  93. #endif