Re:Passing a TComponent from COM-server to COM-client
Timo,
You may pass class instances around via COM, but they must be marshalled a
bit differently... For instance, you may stuff
an instance of a class into a VarArray of byte and then send that to another
COM object. (I believe that Delphi informant
had an article that went over this, but unfortunately I can't find the
article number)
You may want to look into Midas (ClientDataSets, etc..) to see if that is
what you are looking into doing for database connectivity.
Good Luck,
--
-Adam
Delphi Developer Support
Due to my workload, personal email more than likely won't get a
reply.
Support options are detailed at http://www.inprise.com/devsupport/
I am unable to answer support questions via email at this time.
Quote
Timo van Noppen wrote:
> As a newbie in COM-world I am trying to make the following getting to work.
> I have created a COM-server that will open a TDatabase-connection when
> created. Now I would like the client to use this connection when it needs
> access to the database. Thus, not a new connection with the same parameters
> but the existing one.
> Normally you can pass pointers to objects using LongInt between different
> Forms etc., but this does not work. Obvious probably?
> But is there a way to accomplish this?
> Regards,
> Timo