Emanuil Achim
April 19th, 1999, 02:06 PM
I am desperate !!!
I have a COM server (in VB) and I implement the COM client in VC++. One of the functions in the server needs as parameter, a pointer to a collection. I imported the "MSVBVM50.dll" and that generate in the "MSVBVM50.tlh" the:
_Collection : IDispatch
....
Now I derivated my Class from this Interface and I implement
IUnknown
IDispatch
_Collection (raw_*)
In my QueryInterface (VC++) I this:
HRESULT MyCollection::QueryInterface(REFIID riid, void** ppv)
{
if(riid == IID_IUnknown)
*ppv = (IUnknown*)this;
else if(riid == IID_IDispatch)
*ppv = (IDispatch*)this;
else if(riid == IID__Collection)
*ppv = this;
else
{
*ppv = NULL;
return E_NOINTERFACE;
}
AddRef();
return S_OK;
}
Wenn the COM-server (VB) calls this, the "riid" it's none of them and the " *ppv = NULL " it's allways NULL.
WHY ????
Waht kind of interface ID can "riid" be ??
Please HELP !!
Thanks a lot !
Emanuil
Emanuil ACHIM
MAN Roland Druckmaschinen AG
Email: emanuil_achim@mro.maI am desperate !!!
I have a COM server (in VB) and I implement the COM client in VC++. One of the functions in the server needs as parameter, a pointer to a collection. I imported the "MSVBVM50.dll" and that generate in the "MSVBVM50.tlh" the:
_Collection : IDispatch
....
Now I derivated my Class from this Interface and I implement
IUnknown
IDispatch
_Collection (raw_*)
In my QueryInterface (VC++) I this:
HRESULT MyCollection::QueryInterface(REFIID riid, void** ppv)
{
if(riid == IID_IUnknown)
*ppv = (IUnknown*)this;
else if(riid == IID_IDispatch)
*ppv = (IDispatch*)this;
else if(riid == IID__Collection)
*ppv = this;
else
{
*ppv = NULL;
return E_NOINTERFACE;
}
AddRef();
return S_OK;
}
Wenn the COM-server (VB) calls this, the "riid" it's none of them and the " *ppv = NULL " it's allways NULL.
WHY ????
Waht kind of interface ID can "riid" be ??
Please HELP !!
Thanks a lot !
Emanuil
I have a COM server (in VB) and I implement the COM client in VC++. One of the functions in the server needs as parameter, a pointer to a collection. I imported the "MSVBVM50.dll" and that generate in the "MSVBVM50.tlh" the:
_Collection : IDispatch
....
Now I derivated my Class from this Interface and I implement
IUnknown
IDispatch
_Collection (raw_*)
In my QueryInterface (VC++) I this:
HRESULT MyCollection::QueryInterface(REFIID riid, void** ppv)
{
if(riid == IID_IUnknown)
*ppv = (IUnknown*)this;
else if(riid == IID_IDispatch)
*ppv = (IDispatch*)this;
else if(riid == IID__Collection)
*ppv = this;
else
{
*ppv = NULL;
return E_NOINTERFACE;
}
AddRef();
return S_OK;
}
Wenn the COM-server (VB) calls this, the "riid" it's none of them and the " *ppv = NULL " it's allways NULL.
WHY ????
Waht kind of interface ID can "riid" be ??
Please HELP !!
Thanks a lot !
Emanuil
Emanuil ACHIM
MAN Roland Druckmaschinen AG
Email: emanuil_achim@mro.maI am desperate !!!
I have a COM server (in VB) and I implement the COM client in VC++. One of the functions in the server needs as parameter, a pointer to a collection. I imported the "MSVBVM50.dll" and that generate in the "MSVBVM50.tlh" the:
_Collection : IDispatch
....
Now I derivated my Class from this Interface and I implement
IUnknown
IDispatch
_Collection (raw_*)
In my QueryInterface (VC++) I this:
HRESULT MyCollection::QueryInterface(REFIID riid, void** ppv)
{
if(riid == IID_IUnknown)
*ppv = (IUnknown*)this;
else if(riid == IID_IDispatch)
*ppv = (IDispatch*)this;
else if(riid == IID__Collection)
*ppv = this;
else
{
*ppv = NULL;
return E_NOINTERFACE;
}
AddRef();
return S_OK;
}
Wenn the COM-server (VB) calls this, the "riid" it's none of them and the " *ppv = NULL " it's allways NULL.
WHY ????
Waht kind of interface ID can "riid" be ??
Please HELP !!
Thanks a lot !
Emanuil