Objects as parameters in COM method calls
I am having problems understanding the correct
way to pass objects as parameters in a method
call to a COM object. For a (relatively) simple
example of what I want to do...
I want to store a number of TOracleQuery
components in an automation object (in a DLL). I
will have several of these DLLs to use in my
final application, so to save on resources, I
want to have only one TOracleSession, on the main
form of my EXE. My plan is to create instances of
each automation object (as 'in process servers')
when required, and retrieve data from the Oracle
Queries via Automation events, passing integers
and wide strings back to the calling form. My
problem is that the OracleQuery requires a
session parameter, which I would like to set at
run time. I thought that I could create a method
in my automation object which took the session
object as a parameter (or at least a pointer to
the Session), but am not sure how to do this.
What is the COM compatible type for passing
objects (or pointers to objects)? I am new to
COM, so please accept my apologies if the
question makes no sense at all!
Sent via Deja.com http://www.deja.com/
Before you buy.