home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / inole2 / interfac / iparsedn.cpp < prev    next >
C/C++ Source or Header  |  1996-05-21  |  2KB  |  91 lines

  1. /*
  2.  * IPARSEDN.H
  3.  *
  4.  * Template IParseDisplayName interface implementation.
  5.  *
  6.  * Copyright (c)1993-1995 Microsoft Corporation, All Right Reserved
  7.  *
  8.  * Kraig Brockschmidt, Microsoft
  9.  * Internet  :  kraigb@microsoft.com
  10.  * Compuserve:  >INTERNET:kraigb@microsoft.com
  11.  */
  12.  
  13.  
  14. #include "iparsedn.h"
  15.  
  16.  
  17. /*
  18.  * CImpIParseDisplayName::CImpIParseDisplayName
  19.  * CImpIParseDisplayName::~CImpIParseDisplayName
  20.  *
  21.  * Parameters (Constructor):
  22.  *  pObj            LPVOID of the object we're in.
  23.  *  pUnkOuter       LPUNKNOWN to which we delegate.
  24.  */
  25.  
  26. CImpIParseDisplayName::CImpIParseDisplayName(LPVOID pObj
  27.     , LPUNKNOWN pUnkOuter)
  28.     {
  29.     m_cRef=0;
  30.     m_pObj=pObj;
  31.     m_pUnkOuter=pUnkOuter;
  32.     return;
  33.     }
  34.  
  35. CImpIParseDisplayName::~CImpIParseDisplayName(void)
  36.     {
  37.     return;
  38.     }
  39.  
  40.  
  41.  
  42. /*
  43.  * CImpIParseDisplayName::QueryInterface
  44.  * CImpIParseDisplayName::AddRef
  45.  * CImpIParseDisplayName::Release
  46.  *
  47.  * Purpose:
  48.  *  Delegating IUnknown members for CImpIParseDisplayName.
  49.  */
  50.  
  51. STDMETHODIMP CImpIParseDisplayName::QueryInterface(REFIID riid
  52.     , LPVOID *ppv)
  53.     {
  54.     return m_pUnkOuter->QueryInterface(riid, ppv);
  55.     }
  56.  
  57. STDMETHODIMP_(ULONG) CImpIParseDisplayName::AddRef(void)
  58.     {
  59.     ++m_cRef;
  60.     return m_pUnkOuter->AddRef();
  61.     }
  62.  
  63. STDMETHODIMP_(ULONG) CImpIParseDisplayName::Release(void)
  64.     {
  65.     --m_cRef;
  66.     return m_pUnkOuter->Release();
  67.     }
  68.  
  69.  
  70.  
  71.  
  72. /*
  73.  * CImpIParseDisplayName::ParseDisplayName
  74.  *
  75.  * Purpose:
  76.  *  Parses an object's display name into a moniker to the object.
  77.  *
  78.  * Parameters:
  79.  *  pBindCtx        LPBC to the bind context in use.
  80.  *  pszName         LPOLESTR to the display name to parse.
  81.  *  pchEaten        ULONG * in which to store the number of
  82.  *                  characters parsed.
  83.  *  ppmk            LPMONIKER * in which to store the moniker.
  84.  */
  85.  
  86. STDMETHODIMP CImpIParseDisplayName::ParseDisplayName(LPBC pBindCtx
  87.     , LPOLESTR pszName, ULONG * pchEaten, LPMONIKER *ppmk)
  88.     {
  89.     return ResultFromScode(E_NOTIMPL);
  90.     }
  91.