views:

181

answers:

2

I am using GenTLB.exe to compile a ridl file to .tlb and _TLB.pas files.

In the resulting _TLB.pas file, there are hints that it has renamed a number of symbols by appending an underscore to the end of the name.

A sample of the hints is:

// Errors:
//   Hint: Symbol 'Assign' renamed to 'Assign_'
//   Hint: Enum Member '_amStretch' of 'EnumVRSAppliedMaterial' changed to '_amStretch_'
//   Hint: Enum Member '_amTile' of 'EnumVRSAppliedMaterial' changed to '_amTile_'

The command line I use with GenTLB is:

GenTLB -P -Pt+ <ridl file>

I get the same problem occuring if I use the tlibimp tool as well.

+5  A: 

I am not sure, but often an underscore is appended in front of a name, if the name is conflicting with and exsisting name (e.g. reserwed word, and so). It could be something like that.

BennyBechDk
+3  A: 

Assign is renamed to Assign_ because of a mapping in tlibimp.sym, a INI-format text file in the same directory as tlibimp.

Another piece of logic continuously appends '_' until the name is unique with respect to prior global names tlibimp has found. All enumeration members are interpreted as globals. Are there any other instances of _amTile etc. in the generated .pas file?

Barry Kelly
Thankyou. The Assign rename is a nasty little trap - I'll have to decide how best to avoid it.Yes, there is another instance of _amTile in the generated .pas file - looks like I'm guilty of doubling up on some stuff when generating the ridl code :-(
Alistair Ward