Ben,
There is no direct method, but I would suggest you look at the code for
MethodAddress. Unfortunately it is in assembly. Essentially, at offset
vmtMethodTable in the VMT, there is a pointer to the method table. The
first 2 bytes in the table holds the number of methods. This is followed by
the method names, stored as consecutive strings, prefixed with 4 bytes that
holds the length of the record, then the method address (4 bytes), then a
shortstring of method name. If you walk this list, it ought to give you the
list of published method names. public, protected and private method names
are not available in the RTTI, so you will not have access to them.
Published names are not mangled by the linker. Furthermore, in PASCAL names
are not case sensitive.
Note that this information is likely to change between versions of Delphi,
so be careful.
I guess you next problem is to determine the type of method (eg arguments
passed, etc). This info is not so easy to retrieve.
Regards,
Dennis.
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Ben Taylor
> Sent: Tuesday, 6 June 2000 10:54
> To: Multiple recipients of list delphi
> Subject: [DUG]: rtti stuff
>
>
> Hi!
>
> does anyone have ideas on how to generate (at runtime)
> a list of procedure names in an object?
>
> I'm aware that for rtti to work, the procedures will
> have to be published, but i can only find references
> to using properties via rtti...
>
> fyi from the list i intend to use MethodAddress() to
> execute stuff from a script...
>
> Thanks,
> Ben.
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos -- now, 100 FREE prints!
> http://photos.yahoo.com
> --------------------------------------------------------------
> -------------
> New Zealand Delphi Users group - Delphi List -
> [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz