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 / chap05 / dkoala3 / dkoala3.h < prev    next >
C/C++ Source or Header  |  1995-05-03  |  2KB  |  66 lines

  1. /*
  2.  * DKOALA3.H
  3.  * Koala Object DLL Licensed Server Chapter 5
  4.  *
  5.  * Definitions, classes, and prototypes for a DLL that
  6.  * provides Koala 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 _DKOALA3_H_
  17. #define _DKOALA3_H_
  18.  
  19.  
  20. //Get the object definitions
  21. #define INC_CONTROLS
  22. #include "koala.h"
  23.  
  24. BOOL CheckForLicenseFile(HINSTANCE, LPTSTR, LPBYTE, UINT);
  25.  
  26.  
  27. void   ObjectDestroyed(void);
  28.  
  29.  
  30. //DKOALA.CPP
  31. //This class factory object creates Koala objects.
  32.  
  33. class CKoalaClassFactory : public IClassFactory2
  34.     {
  35.     protected:
  36.         ULONG           m_cRef;
  37.  
  38.     private:
  39.         HRESULT CreateAnObject(LPUNKNOWN, REFIID, PPVOID);
  40.  
  41.  
  42.     public:
  43.         CKoalaClassFactory(void);
  44.         ~CKoalaClassFactory(void);
  45.  
  46.         //IUnknown members
  47.         STDMETHODIMP         QueryInterface(REFIID, PPVOID);
  48.         STDMETHODIMP_(ULONG) AddRef(void);
  49.         STDMETHODIMP_(ULONG) Release(void);
  50.  
  51.         //IClassFactory members
  52.         STDMETHODIMP         CreateInstance(LPUNKNOWN, REFIID
  53.                                  , PPVOID);
  54.         STDMETHODIMP         LockServer(BOOL);
  55.  
  56.         //IClassFactory2 members
  57.         STDMETHODIMP         GetLicInfo(LPLICINFO);
  58.         STDMETHODIMP         RequestLicKey(DWORD, BSTR *);
  59.         STDMETHODIMP         CreateInstanceLic(LPUNKNOWN
  60.                                 , LPUNKNOWN, REFIID, BSTR, PPVOID);
  61.     };
  62.  
  63. typedef CKoalaClassFactory *PCKoalaClassFactory;
  64.  
  65. #endif //_DKOALA3_H_
  66.