BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DispInterface

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (ActiveX)
View previous topic :: View next topic  
Author Message
Pippo
Guest





PostPosted: Thu Oct 21, 2004 1:44 pm    Post subject: DispInterface Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (ActiveX) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.