Re: how load html page from memory in ShowHTMLDialog function
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Sat, 25 Jun 2005 20:54:12 -0400
"ragi" <ragi@xxxxxxxx> wrote in message
news:eyhwlfeeFHA.2420@xxxxxxxxxxxxxxxxxxxx
> I have now two QueryInterface method (one if from IUnknown):
>
>
> HRESULT STDMETHODCALLTYPE CHTMLMoniker::QueryInterface( REFIID riid,
> void __RPC_FAR *__RPC_FAR *ppvObject)
> {
> return E_NOTIMPL;
> }
Remove this one
> HRESULT STDMETHODCALLTYPE CHTMLMoniker::QueryInterface(REFIID riid,
> void *ppvObject)
The last parameter should be void** (two stars, not one). I've
copied'n'pasted your method signature and did not notice this error,
sorry.
> {
> if (!ppvObject)
> {
> return E_POINTER;
> }
> ppvObject = 0;
*ppvObject = 0;
> if (riid == IID_IUnknown || riid == IID_IPersist || riid ==
> IID_IPersistStream || riid == IID_IMoniker)
> {
> AddRef();
> ppvObject = static_cast<IMoniker*>(this);
*ppvObject = static_cast<IMoniker*>(this);
> return S_OK;
> }
> return E_NOINTERFACE;
> }
>
> I'm not sure if first QueryInterface should return E_NOTIMPL.
>
> -----------------------------------------
>
> This is my main method once again:
>
>
> int CHtmlDialog::DoModal()
> {
> HRESULT hr;
> //Now create a URL Moniker
> CHTMLMoniker* pUrlMoniker = new CHTMLMoniker;
Add pUrlMoniker->AddRef(), or alternatively set m_refCount to 1 in
CHTMLMoniker's constructor.
> CreateURLMoniker(NULL, bstrURL, (LPMONIKER*)&pUrlMoniker);
Remove this already. You do _not_ need a standard URL moniker. You
should _not_ call CreateURLMoniker. You overwrite your pUrlMoniker
variable that points to an instance of CHTMLMoniker class, with a
pointer to completely unrelated object.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- Follow-Ups:
- References:
- how load html page from memory in ShowHTMLDialog function
- From: ragi
- Re: how load html page from memory in ShowHTMLDialog function
- From: Igor Tandetnik
- Re: how load html page from memory in ShowHTMLDialog function
- From: ragi
- Re: how load html page from memory in ShowHTMLDialog function
- From: Igor Tandetnik
- Re: how load html page from memory in ShowHTMLDialog function
- From: ragi
- Re: how load html page from memory in ShowHTMLDialog function
- From: Igor Tandetnik
- Re: how load html page from memory in ShowHTMLDialog function
- From: ragi
- Re: how load html page from memory in ShowHTMLDialog function
- From: Igor Tandetnik
- Re: how load html page from memory in ShowHTMLDialog function
- From: ragi
- Re: how load html page from memory in ShowHTMLDialog function
- From: Igor Tandetnik
- Re: how load html page from memory in ShowHTMLDialog function
- From: ragi
- Re: how load html page from memory in ShowHTMLDialog function
- From: Igor Tandetnik
- Re: how load html page from memory in ShowHTMLDialog function
- From: ragi
- how load html page from memory in ShowHTMLDialog function
- Prev by Date: Re: how load html page from memory in ShowHTMLDialog function
- Next by Date: Re: how load html page from memory in ShowHTMLDialog function
- Previous by thread: Re: how load html page from memory in ShowHTMLDialog function
- Next by thread: Re: how load html page from memory in ShowHTMLDialog function
- Index(es):
Relevant Pages
|
|