home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / numega / sc501.exe / data1.cab / Examples / EX.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-25  |  1.4 KB  |  49 lines

  1. /*----------------------------------------------------------------------
  2. Using this file to build other OLE interfaces.....
  3. 0.  Save this file as something other than EX.H
  4. 1.  Search for "_EX_H" and change them to the name of the file you are
  5.     creating.
  6. 2.  Search for "I*" and change it to the name of the interface you are
  7.     deriving from.
  8. 3.  Put the specific interface functions at the END of the class.
  9. ----------------------------------------------------------------------*/
  10. // Change these defines to the filename!!!
  11. #ifndef _EX_H
  12. #define _EX_H
  13.  
  14. #include "IUnknown.h"
  15. #include "TstMacro.h"
  16.  
  17. // Change the class name.
  18. // Change the I* name.
  19. class CI* : public CInternalQuery ,
  20.             public I*
  21.  
  22. {
  23. // Leave the protected section alone.
  24. protected   :
  25.     // Object reference count
  26.     ULONG           m_cRef          ;
  27.     // Controlling unknown
  28.     LPUNKNOWN       m_pUnkOuter     ;
  29.     // The base unknown class.
  30.     PCIUnknown      m_pBaseUnk      ;
  31.  
  32. public      :
  33.     // Change the I* to the name of the interface you are supporting.
  34.     CI* ( LPUNKNOWN pUnkOuter , CIUnknown * pMainIUnk ) ;
  35.     ~CI* ( void ) ;
  36.  
  37.     BOOL Init ( void ) ;
  38.  
  39.     virtual STDMETHODIMP InternalQueryInterface ( REFIID riid ,
  40.                                                   PPVOID ppv   ) ;
  41.  
  42.     DECLARE_IUNKNOWNFNS() ;
  43.  
  44.     // PUT ALL INTERFACE SPECIFIC FUNCTIONS HERE
  45. } ;
  46.  
  47. #endif      // _EX_H
  48.  
  49.