home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / winui / shell / regview / clsfact.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-27  |  1.6 KB  |  57 lines

  1. /**************************************************************************
  2.    THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  3.    ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  4.    THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  5.    PARTICULAR PURPOSE.
  6.  
  7.    Copyright 1997 Microsoft Corporation.  All Rights Reserved.
  8. **************************************************************************/
  9.  
  10. /**************************************************************************
  11.  
  12.    File:          ClsFact.h
  13.    
  14.    Description:   CClassFactory definitions.
  15.  
  16. **************************************************************************/
  17.  
  18. #ifndef CLASSFACTORY_H
  19. #define CLASSFACTORY_H
  20.  
  21. #include <windows.h>
  22. #include "ShlFldr.h"
  23. #include "ShlView.h"
  24.  
  25. /**************************************************************************
  26.    global variables
  27. **************************************************************************/
  28.  
  29. extern HINSTANCE  g_hInst;
  30.  
  31. /**************************************************************************
  32.  
  33.    CClassFactory class definition
  34.  
  35. **************************************************************************/
  36.  
  37. class CClassFactory : public IClassFactory
  38. {
  39. protected:
  40.    DWORD m_ObjRefCount;
  41.  
  42. public:
  43.    CClassFactory();
  44.    ~CClassFactory();
  45.  
  46.    //IUnknown methods
  47.    STDMETHODIMP QueryInterface(REFIID, LPVOID*);
  48.    STDMETHODIMP_(DWORD) AddRef();
  49.    STDMETHODIMP_(DWORD) Release();
  50.  
  51.    //IClassFactory methods
  52.    STDMETHODIMP CreateInstance(LPUNKNOWN, REFIID, LPVOID*);
  53.    STDMETHODIMP LockServer(BOOL);
  54. };
  55.  
  56. #endif   //CLASSFACTORY_H
  57.