The DejaVU Framework -- hush 3.1

include: hush-src-multi-DLL-UILayer.h /home/ae/media

- [up] [top] - index make include source logic grammar scripts html configure mx slides talks scenes reports projects
<body bgcolor="#FFFFFF" text="#000000">

// File: UILayer.h
// Desc: DirectShow sample code - Declaration of the CMultiVMR9UILayer
// Copyright (c) Microsoft Corporation.  All rights reserved.

#pragma once
include <resource.h>       // main symbols

include <MultiVMR9.h>

// CMultiVMR9UILayer

<h4 align=right text=red> CMultiVMR9UILayer</h4><hr>
  class CMultiVMR9UILayer : 
    public CUnknown,
    public IMultiVMR9UILayer
    CMultiVMR9UILayer(LPUNKNOWN pUnk, HRESULT *phr);
    virtual ~CMultiVMR9UILayer();

    // IUnknown implementation
    STDMETHODIMP NonDelegatingQueryInterface(REFIID, void**);
    static CUnknown *CreateInstance(LPUNKNOWN, HRESULT *);

    // IMultiVMR9UILayer implementation
    STDMETHOD(Initialize)(IDirect3DDevice9 *pDevice);
    STDMETHOD(ProcessMessage)(UINT msg, UINT wParam, LONG lParam);
    STDMETHOD(Render)(IDirect3DDevice9 *pDevice);
    STDMETHOD(SetRenderEngineOwner)(IMultiVMR9RenderEngine* pRenderEngine);
    STDMETHOD(GetRenderEngineOwner)(IMultiVMR9RenderEngine** ppRenderEngine);
        STDMETHOD(EndDeviceLoss)( IDirect3DDevice9* pDevice );

// class factory
extern long g_CountUILayer;


  class CCFMultiVMR9UILayer : public IClassFactory
      // Constructor
      CCFMultiVMR9UILayer() : m_RefCount(1) {} 
      // IUnknown methods
      STDMETHOD(QueryInterface)(REFIID riid, void ** ppv)
          if (IID_IUnknown == riid)
              *ppv = static_cast<IUnknown *>(this);
          else if (IID_IClassFactory == riid)
              *ppv = static_cast<IClassFactory *>(this);
              *ppv = NULL;
              return E_NOINTERFACE;
          static_cast<IUnknown *>(*ppv)->AddRef();
          return S_OK;
      STDMETHOD_(ULONG, AddRef())
          return InterlockedIncrement(&m_RefCount);
      STDMETHOD_(ULONG, Release())
          LONG ref = InterlockedDecrement(&m_RefCount);
          if (0 == ref)
              delete this;
          return ref;
      // IClassFactory methods
      STDMETHOD(CreateInstance)(IUnknown * punkOuter, REFIID riid, void ** ppvObject)
          HRESULT hr = S_OK;
          if (NULL == ppvObject)
              return E_POINTER;
          *ppvObject = NULL; // initialize the pointer
          // we don't support aggregation
          if (NULL != punkOuter)
              return CLASS_E_NOAGGREGATION;
          // create a new Wizard object
          CMultiVMR9UILayer * pUILayer = new CMultiVMR9UILayer(punkOuter, &hr);
          if (NULL == pUILayer)
              return E_OUTOFMEMORY;
          // now QI for the requested interface.  If this fails, delete the object
          hr = pUILayer->QueryInterface(riid, ppvObject);
          if (FAILED(hr))
              delete pUILayer;
          return hr;
      STDMETHOD(LockServer)(BOOL fLock)
          if (fLock)
          return S_OK;
      LONG m_RefCount;


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author. <script src="" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-2780434-1"; urchinTracker(); </script>

Hush Online Technology