clsfact.h
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 1k
Category:

Windows Kernel

Development Platform:

Visual C++

  1. //\//\//\//\//\//\//\//\//\//\//\//\//\//\//\//\//\//\//\//\
  2. //
  3. // clsfact.h 
  4. //
  5. //   Definitions for the cdf viewer class factory..
  6. //
  7. //   History:
  8. //
  9. //       3/16/97  edwardp   Created.
  10. //
  11. ////////////////////////////////////////////////////////////////////////////////
  12. //
  13. // Check for previous includes of this file.
  14. //
  15. #ifndef _CLSFACT_H_
  16. #define _CLSFACT_H_
  17. //
  18. // Prototype for function used in class factory to create objects.
  19. typedef HRESULT (*CREATEPROC)(IUnknown** ppIUnknown);
  20. //
  21. // Class definition for the class factory
  22. //
  23. class CCdfClassFactory : public IClassFactory
  24. {
  25. //
  26. // Methods
  27. //
  28. public:
  29.     // Constructor
  30.     CCdfClassFactory(CREATEPROC pfn);
  31.     // IUnknown
  32.     STDMETHODIMP         QueryInterface(REFIID, void **);
  33.     STDMETHODIMP_(ULONG) AddRef(void);
  34.     STDMETHODIMP_(ULONG) Release(void);
  35.     //IClassFactory
  36.     STDMETHODIMP         CreateInstance(LPUNKNOWN, REFIID, void **);
  37.     STDMETHODIMP         LockServer(BOOL);
  38. private:
  39.     
  40.     // Destructor
  41.     ~CCdfClassFactory(void);
  42. //
  43. // Members
  44. //
  45. private:
  46.     ULONG       m_cRef;
  47.     CREATEPROC  m_Create;
  48. };
  49. #endif // _CLSFACT_H_