home *** CD-ROM | disk | FTP | other *** search
- /*
- * OleWnd.cpp
- * $Header: /bcsample/IFACEDLL/OLEWND.CPP 1 5/28/96 1:12p Dave $
- *
- * Description:
- * This file provides the test-implementation of the IOleWindow interface.
- *
- * Notes:
- * <implementation notes go here>
- *
- ***********************************************************************
- *
- * NuMega Technologies, Inc.
- * P.O. Box 7780
- * Nashua, NH 03060
- *
- * (c) Copyright 1994, 1995, 1996 NuMega Technologies, Inc.
- * ALL RIGHTS RESERVED.
- *
- ***********************************************************************
- *
- **********************************************************************/
-
-
- #include "IFT_OLE.h"
- #include "OleWnd.h"
-
- CIOleWindow :: CIOleWindow ( LPUNKNOWN pUnkOuter , PCIUnknown pMainIUnk )
- {
- m_cRef = 0 ;
- m_pUnkOuter = pUnkOuter ;
- m_pBaseUnk = pMainIUnk ;
- }
-
- CIOleWindow :: ~CIOleWindow ( void )
- {
- }
-
- BOOL CIOleWindow :: Init ( void )
- {
- return ( TRUE ) ;
- }
-
- STDMETHODIMP_( ULONG ) CIOleWindow :: AddRef ( void )
- {
- return ( m_pBaseUnk->AddRef( ) ) ;
- }
-
- STDMETHODIMP_( ULONG ) CIOleWindow :: Release ( void )
- {
- return ( m_pBaseUnk->Release( ) ) ;
- }
-
- STDMETHODIMP CIOleWindow :: QueryInterface ( REFIID riid ,
- PPVOID ppv )
- {
- *ppv = NULL ;
-
- if ( IID_IOleWindow == riid )
- {
- *ppv = ( IOleWindow* ) this ;
- ( ( LPUNKNOWN ) *ppv)->AddRef ( ) ;
- return ( NOERROR ) ;
- }
- else
- {
- // We just defer any other calls to the base IUnknown.
- return ( m_pBaseUnk->QueryInterface ( riid , ppv ) ) ;
- }
- }
-
- STDMETHODIMP CIOleWindow :: InternalQueryInterface ( REFIID riid ,
- PPVOID ppv )
- {
- // Always set the interface memory location to NULL.
- *ppv = NULL ;
-
- // If this ID is ours, then return ourselves.
- if ( IID_IOleWindow == riid )
- {
- *ppv = ( IOleWindow* )this ;
- return ( NOERROR ) ;
- }
- return ( E_NOINTERFACE ) ;
- }
-
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Place all interface functions here!!
-
- HRESULT __stdcall CIOleWindow :: GetWindow ( HWND __RPC_FAR *phwnd )
- {
- return ( S_OK ) ;
-
- }
-
- HRESULT __stdcall CIOleWindow :: ContextSensitiveHelp ( BOOL fEnterMode )
- {
- return ( S_OK ) ;
-
- }
-
-