Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
887 B

  1. // ITParse.cpp -- Implementation for the CParser class
  2. #include "stdafx.h"
  3. HRESULT STDMETHODCALLTYPE CParser::Create(IUnknown *punkOuter, REFIID riid, PPVOID ppv)
  4. {
  5. if (punkOuter && riid != IID_IUnknown)
  6. return CLASS_E_NOAGGREGATION;
  7. CParser *pParser = New CParser(punkOuter);
  8. if (!pParser)
  9. return STG_E_INSUFFICIENTMEMORY;
  10. HRESULT hr = pParser->m_ImpIParser.Init();
  11. if (hr == S_OK)
  12. hr = pParser->QueryInterface(riid, ppv);
  13. if (hr != S_OK)
  14. delete pParser;
  15. return hr;
  16. }
  17. HRESULT STDMETHODCALLTYPE CParser::CImpIParser::ParseDisplayName(
  18. /* [unique][in] */ IBindCtx __RPC_FAR *pbc,
  19. /* [in] */ LPOLESTR pszDisplayName,
  20. /* [out] */ ULONG __RPC_FAR *pchEaten,
  21. /* [out] */ IMoniker __RPC_FAR *__RPC_FAR *ppmkOut)
  22. {
  23. return CStorageMoniker::CreateStorageMoniker
  24. (NULL, pbc, pszDisplayName, pchEaten, ppmkOut);
  25. }