Hmm.
Would hard coding the CLSID which is what I'm trying to get for
CreateOLEobject() as a const in the dll or prop be a unwise choice then?

Matthew Evans
Seveno Limited

Tel +64 9 3582585
Fax +64 9 358 3534
Address 72 Grafton Road, Grafton Auckland, New Zealand
Email [EMAIL PROTECTED]
Website www.seveno.com


-----Original Message-----
From: Myles Penlington [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 20 March 2003 12:38 p.m.
To: Multiple recipients of list delphi
Subject: RE: [DUG]: Type Lib Question

Yes you can get some information. It's more a question of how. You need
to
have your objects support IDispatch, then you can access the type lib
information more easily - otherwise you would have to descend into C/C++
to
read through the type library.

If you load the DLL, then call DllGetClassObject (or use the equivalent
COM
object call - get classFactory (I think that is the function call)) ,
passing in the class ID/GUID, you can get a reference to the class
object
factory. From there you can get the COM type info interface for the
objects.

Perhaps the easiest, would be to add another interface to your objects
(or
your factories) to supply the information you want.

In either case look in the ActiveX and ComServ unit. If you have to you
get
class Id's etc from the registry (Yuk). Or you could add another method
to
your DLL to export the ComClassManager - which would make things very
easy
then (you could then use Delphi RTTI on the class factories and object
instances).

Myles.

-----Original Message-----
From: Matthew Evans [mailto:[EMAIL PROTECTED]
Sent: Thursday, 20 March 2003 11:42 a.m.
To: Multiple recipients of list delphi
Subject: [DUG]: Type Lib Question


Hey all again :]
Question, I have a ActiveX dll and I want to be able to read some type
lib information out of it such as the coClass names etc. Is this
possible at all? If so how would I go about doing it?

*Goes back to read "Delphi COM programming" hoping for a miracle*
------------------------------------------------------------------------
---
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
------------------------------------------------------------------------
---
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to