 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Pippo Guest
|
Posted: Thu Oct 21, 2004 1:44 pm Post subject: DispInterface |
|
|
Hi to all, I've got a terrible problem.
I'm using a third party COM component (COM InProcess) in my
projects. I imported the type library and I use this
statement to create a new object instance:
pdisp.Bind("ProgID");
where ProgID is the COM ProgID I want to use.
Last week I received a new version of the DLL, I overwrote the
old one and my program doesn't work at all.
The COM exposes the same interfaces, I tried to debug the
previous instruction and I see that the problem is in this
part of code (from utilcls.h):
template <class DISPINTF> HRESULT
TAutoDriver<DISPINTF>::Bind(LPUNKNOWN punk)
{
_ASSERTE(punk /* Must bind to non-NULL interface pointer */);
HRESULT hr = E_POINTER;
if (punk)
{
DISPINTF *disp;
hr = punk->QueryInterface(__uuidof(DISPINTF), (LPVOID*)&disp);
if (SUCCEEDED(hr))
Bind(disp, false /* Don't AddRef */);
}
return hr;
}
the QueryInterface method fails. Is it possible
that IDispatch GUID is different from different versions
of the same component????
Is there a solution without re-importing the new component
type library???. I want that because my application runs over
computers that have the COM old version and other ones that
have the new version.
TIA.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|