home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / netds / adsi / sampprov / cclsobj.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-29  |  2.3 KB  |  127 lines

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