home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / inole2 / interfac / iclassf.h < prev    next >
C/C++ Source or Header  |  1996-05-21  |  1KB  |  44 lines

  1. /*
  2.  * ICLASSF.H
  3.  *
  4.  * Definitions for a template Class Factory object with the
  5.  * IClassFactory interface.
  6.  *
  7.  * Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
  8.  *
  9.  * Kraig Brockschmidt, Microsoft
  10.  * Internet  :  kraigb@microsoft.com
  11.  * Compuserve:  >INTERNET:kraigb@microsoft.com
  12.  */
  13.  
  14.  
  15. #ifndef _ICLASSF_H_
  16. #define _ICLASSF_H_
  17.  
  18. #include <inole.h>
  19.  
  20. class CClassFactory;
  21. typedef class CClassFactory *PCClassFactory;
  22.  
  23. class CClassFactory : public IClassFactory
  24.     {
  25.     protected:
  26.         ULONG           m_cRef;         //Reference count on object
  27.  
  28.     public:
  29.         CClassFactory(void);
  30.         ~CClassFactory(void);
  31.  
  32.         //IUnknown interface members
  33.         STDMETHODIMP QueryInterface(REFIID, LPVOID *);
  34.         STDMETHODIMP_(ULONG) AddRef(void);
  35.         STDMETHODIMP_(ULONG) Release(void);
  36.  
  37.         //IClassFactory members
  38.         STDMETHODIMP CreateInstance(LPUNKNOWN, REFIID, LPVOID *);
  39.         STDMETHODIMP LockServer(BOOL);
  40.     };
  41.  
  42.  
  43. #endif //_ICLASSF_H_
  44.