Depends on what wheel you're trying to reinvent.
 
To take one example, if your COM server object is on another machine,
surely there is the potential for the type library on your client
machine to not match the type library of the server object that you're
trying to connect to.  Hence our use of a specific version function
exposed explicitly by the COM server object.
 
I agree that on the same PC, then the number in the typelib could be
what you're looking for.
 
Anyways, with a bit of googling, here are some things you could look at:
 
The ITypeLib:GetLibAttr interface/function:
http://msdn2.microsoft.com/en-us/library/ms221641.aspx
Appears to return a pointer to a record with Major and Minor version
numbers.
 
The TComServerObject class has a TypeLib property which returns an
ITypeLib interface.
 
No idea whether that's accessible in your case or not, but you can look
into it.
 
HTH,
 
C.

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Leigh Wanstead
 
Yes, from a COM client.
 
I thought that version information is already in the typelib. I don't
want to reinvent the wheel.

        -----Original Message-----
        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Conor Boyd
         
        Do you mean from a COM client?
         
        Not sure if there is a way.  We just have a method on the COM
server object which returns a version number of use to us.
         
        HTH,
         
        C.
         
        P.S.  I know it's less of an issue these days, but with all due
respect, your bitmap would have been better sent (and just as readable)
as a 20KB JPEG or a 4KB PNG...

________________________________

        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Leigh Wanstead
         
        How to retrive com object runtime version number specified in
typelib? I have enclosed a bitmap file for your reference.

_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

Reply via email to