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 / chap10 / ddataobj / ddataobj.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-03  |  1.3 KB  |  51 lines

  1. /*
  2.  * DDATAOBJ.H
  3.  * Data Object DLL Chapter 10
  4.  *
  5.  * Definitions, classes, and prototypes for a DLL that
  6.  * provides DataObject objects to any other object user.
  7.  *
  8.  * Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
  9.  *
  10.  * Kraig Brockschmidt, Microsoft
  11.  * Internet  :  kraigb@microsoft.com
  12.  * Compuserve:  >INTERNET:kraigb@microsoft.com
  13.  */
  14.  
  15.  
  16. #ifndef _DDATAOBJ_H_
  17. #define _DDATAOBJ_H_
  18.  
  19. #include "dataobj.h"
  20.  
  21.  
  22. //DDATAOBJ.CPP
  23. void ObjectDestroyed(void);
  24.  
  25. //This class factory object creates Data Objects.
  26.  
  27. class CDataObjectClassFactory : public IClassFactory
  28.     {
  29.     protected:
  30.         ULONG           m_cRef;
  31.         UINT            m_iSize;        //Data size for this class
  32.  
  33.     public:
  34.         CDataObjectClassFactory(UINT);
  35.         ~CDataObjectClassFactory(void);
  36.  
  37.         //IUnknown members
  38.         STDMETHODIMP         QueryInterface(REFIID, PPVOID);
  39.         STDMETHODIMP_(ULONG) AddRef(void);
  40.         STDMETHODIMP_(ULONG) Release(void);
  41.  
  42.         //IClassFactory members
  43.         STDMETHODIMP         CreateInstance(LPUNKNOWN, REFIID
  44.                                  , PPVOID);
  45.         STDMETHODIMP         LockServer(BOOL);
  46.     };
  47.  
  48. typedef CDataObjectClassFactory *PCDataObjectClassFactory;
  49.  
  50. #endif //_DDATAOBJ_H_
  51.