Re: COM Interface intialization
- From: "Steven Edison" <EdisonCPP@xxxxxxxxxxxxxxxxx>
- Date: Mon, 15 Jan 2007 16:37:11 -0500
Thanks Igor.
That works like a charm in the actual application.
I've never seen the CComObject<Q>::CreateInstance() used with
the CoClass. I found this very educational.
Sorry again for missing your piece of code.
This works 100%!
Steven
"Igor Tandetnik" <itandetnik@xxxxxxxx> wrote in message
news:%23qaldnOOHHA.5104@xxxxxxxxxxxxxxxxxxxxxxx
"Steven Edison" <EdisonCPP@xxxxxxxxxxxxxxxxx> wrote in message
news:O%23%23nPQOOHHA.1240@xxxxxxxxxxxxxxxxxxxx
So Igor what are you suggesting?
something like:
STDMETHODIMP CAnotherInterfaceImpl::GetItemInfo(IItemInfo** pRetUnk)
{
CItemInfo* pInfo = new CItemInfo; //above impl class
pInfo->SetSomeData(0x42); //exposed through impl. class, but
No. Something like the code I've shown. What makes you think I could be
suggesting anything other than precisely the code I've typed?
Now that you've changed the parameter type to IItemInfo**, change
IID_IUnknown to IID_IItemInfo in my code and make it the body of
GetItemInfo method. It should work as is.
--
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
.
- References:
- COM Interface intialization
- From: Steven Edison
- Re: COM Interface intialization
- From: Brian Muth
- Re: COM Interface intialization
- From: Steven Edison
- Re: COM Interface intialization
- From: Igor Tandetnik
- Re: COM Interface intialization
- From: Steven Edison
- Re: COM Interface intialization
- From: Igor Tandetnik
- COM Interface intialization
- Prev by Date: Re: COM Interface intialization
- Next by Date: Tracing CComBSTR leaks
- Previous by thread: Re: COM Interface intialization
- Next by thread: Tracing CComBSTR leaks
- Index(es):
Relevant Pages
|