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 

Porting Delphi component to an ActiveX

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Usage
View previous topic :: View next topic  
Author Message
Keshav
Guest





PostPosted: Tue Dec 09, 2003 6:59 am    Post subject: Porting Delphi component to an ActiveX Reply with quote



I am actually working on porting an existing Delphi component to an ActiveX.
Almost everything is going fine, having solved most of the compatibility
issues b/w COM and Delphi.
But i am really stuck with this one. Please help me.

The explanation:
----------------
I am basically working on Delphi, converting a delphi component into an
ActiveX.
I am creating an ActiveX wrapper around an existing Delphi component.
All my interfaces call the corresponding methods of the wrapped Delphi
component wrapped inside the ActiveX wrapper.

My requirement is, I need to have a method that accepts another Activex
component.
I.e. If I have two ActiveX components dropped on the client form, I need to
pass an activeX
as a parameter to a method, another activeX that is dropped. Probably I can
pass the
corresponding interface.

Now in the server I want to access through the passed interface some data of
the
corresponding wrapped Delphi component. I am getting access violation if I
do this.
Can I not access from one activeX, data belonging to another ActiveX that is
dropped.
The data that I am trying to access actually belongs to the wrapped
component inside
the ActiveX server.

Example:

In Client: //OCX1 and OCX2 are the two instances of the same ActiveX
dropped
OCX1.SomeMethod(OCX2);

In Server: procedure SomeMethod(OCX)
begin
//FDelphiControl is the wrapped Delphi component in the
ActiveX server.
//It is a private member in the implementation class of
the main interface
//of the ActiveX.
ShowMessage(OCX.FDelphiControl.SomeTextProperty);
//I get "catastrophic failure" here.
end;

Please suggest. Please let me know with good links which might have probably
discussed these kind of problems.

Thanks in Advance
Keshav


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Usage 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.