DKOALA3.H
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:2k
源码类别:

Windows编程

开发平台:

Visual C++

  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. #ifndef _DKOALA3_H_
  15. #define _DKOALA3_H_
  16. //Get the object definitions
  17. #define INC_CONTROLS
  18. #include "koala.h"
  19. BOOL CheckForLicenseFile(HINSTANCE, LPTSTR, LPBYTE, UINT);
  20. void   ObjectDestroyed(void);
  21. //DKOALA.CPP
  22. //This class factory object creates Koala objects.
  23. class CKoalaClassFactory : public IClassFactory2
  24.     {
  25.     protected:
  26.         ULONG           m_cRef;
  27.     private:
  28.         HRESULT CreateAnObject(LPUNKNOWN, REFIID, PPVOID);
  29.     public:
  30.         CKoalaClassFactory(void);
  31.         ~CKoalaClassFactory(void);
  32.         //IUnknown members
  33.         STDMETHODIMP         QueryInterface(REFIID, PPVOID);
  34.         STDMETHODIMP_(ULONG) AddRef(void);
  35.         STDMETHODIMP_(ULONG) Release(void);
  36.         //IClassFactory members
  37.         STDMETHODIMP         CreateInstance(LPUNKNOWN, REFIID
  38.                                  , PPVOID);
  39.         STDMETHODIMP         LockServer(BOOL);
  40.         //IClassFactory2 members
  41.         STDMETHODIMP         GetLicInfo(LPLICINFO);
  42.     STDMETHODIMP         RequestLicKey(DWORD, BSTR *);
  43.     STDMETHODIMP         CreateInstanceLic(LPUNKNOWN
  44.                                 , LPUNKNOWN, REFIID, BSTR, PPVOID);
  45.     };
  46. typedef CKoalaClassFactory *PCKoalaClassFactory;
  47. #endif //_DKOALA3_H_