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.

93 lines
2.1 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1997.
  5. //
  6. // File: cidsocf.hxx
  7. //
  8. // Contents: Class factory description
  9. //
  10. // History: 1-7-97 markz Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #pragma once
  14. //
  15. // Standard Ole exports
  16. //
  17. extern "C" SCODE STDMETHODCALLTYPE DllGetClassObject( REFCLSID cid,
  18. REFIID iid,
  19. void ** ppvObj );
  20. extern "C" SCODE STDMETHODCALLTYPE DllCanUnloadNow( void );
  21. extern "C" const GUID CLSID_CiFwDSO;
  22. //+---------------------------------------------------------------------------
  23. //
  24. // Class: CDataSrcObjectCF
  25. //
  26. // Purpose: Class Factory to create ole-db datasource objects
  27. //
  28. // History: 3-20-97 mohamedn created
  29. //
  30. //----------------------------------------------------------------------------
  31. class CDataSrcObjectCF : INHERIT_VIRTUAL_UNWIND, public IClassFactory
  32. {
  33. INLINE_UNWIND(CDataSrcObjectCF)
  34. public:
  35. //
  36. // IUnknown methods.
  37. //
  38. STDMETHOD( QueryInterface ) ( THIS_ REFIID riid,LPVOID *ppiuk );
  39. STDMETHOD_( ULONG, AddRef ) ( THIS );
  40. STDMETHOD_( ULONG, Release ) ( THIS );
  41. //
  42. // IClassFactory methods.
  43. //
  44. STDMETHOD( CreateInstance ) ( THIS_
  45. IUnknown * pUnkOuter,
  46. REFIID riid,
  47. void ** ppvObject );
  48. STDMETHOD( LockServer ) ( THIS_ BOOL fLock );
  49. protected:
  50. //
  51. // Constructor and Destructor
  52. //
  53. CDataSrcObjectCF( void );
  54. //
  55. // Hidden destructor so that only we can delete the instance
  56. // based on IUnknown control
  57. //
  58. virtual ~CDataSrcObjectCF();
  59. private:
  60. friend SCODE STDMETHODCALLTYPE DllGetClassObject( REFCLSID cid,
  61. REFIID iid, void** ppvObj );
  62. //
  63. // IUnknown reference count.
  64. //
  65. LONG _RefCount;
  66. };