 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Keshav Guest
|
Posted: Tue Dec 09, 2003 6:59 am Post subject: Porting Delphi component to an ActiveX |
|
|
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 |
|
 |
|
|
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
|
|