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 

COM - Invalid variant operation

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
pjeffris
Guest





PostPosted: Thu Sep 14, 2006 2:00 am    Post subject: COM - Invalid variant operation Reply with quote



Hello,

I have a question about delphi interfacing with a native C++ COM object
created in VC++ 2k5. I have a com object that I am trying to create in
a Delphi app. I can successfully create this object in a c++ container.
Anyway, the code looks like this on the Delphi end of things (I am not
a Delphi developer, so please forgive me if I omit something important
- I'll add it to the topic if I need to - this seems to be the meat of
it though...)

constructor TMainForm.Create(AOwner: TComponent);
var
vApplication: variant;
x: integer;
begin
try
vApplication := CreateOleObject(Server);
except
On EExternalException do
begin
ShowMessage('Unable to create server. '+Server);
Application.Terminate;
end;
On EOleError do
begin
ShowMessage('Unable to create server.'+Server);
Application.Terminate;
end;
end;
end;

On the CreateOleObject(Server) - there is an invalid variant operation
error - is there any set of issues I can look for that can cause this
problem? THanks for any help - let me know if I need to post more info
to clarify the problem.

PJeffris
Back to top
Riki Wiki
Guest





PostPosted: Sun Sep 17, 2006 4:16 pm    Post subject: Re: COM - Invalid variant operation Reply with quote



Hoi

You need to repost your message on the Borland news server to make
everybody see it and possibly answer your message.

How to post to Delphi newsgroups:
<http://delphi.wikia.com/wiki/Delphi_Newsgroups>
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation 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.