Groups | Blog | Home
all groups > dotnet interop > january 2007 >

dotnet interop : Intellisense in VC6 from C# tlb



escristian NO[at]SPAM gmail.com
1/23/2007 8:35:42 AM
I have a project written in C#, which I then create a TLB from. In VC6
I import this .tlb which in turns generates a tlh file. Intellisense
gets it's information from this .thl file ( I tested it).

The only problem is that in the method declarations it always puts
pRetVal as the name of the arguments that set the properties in C#.
i.e:
void PutAbsolutePosition (DATE pRetVal );

Is there any way to change this so it will have a more meaningful name?

for example void PutAbsolutePosition (DATE position);
even PutAbsolutePosition (DATE value); would be fine

In my C# solution I also have a C++ project that implements this
interface and I changed the name of the arguments in that
implementation, but this doesn't change the original interface
declaration (in C# using properties) which in turn creates the TLB file
that everything is generated from.

Thanks
Cholo Lennon
1/25/2007 1:30:08 AM
Names are based in TLB information (use OleViewer to check it) so:

1- You must change that information (if you have access to TLB source code (IDL file))
2- Or you can use the 'rename' attribute of #import directive:

#import "your_com.dll" rename("pRetVal", "position")

Regards

--
Cholo Lennon
Bs.As.
ARG


<escristian@gmail.com> escribió en el mensaje news:1169570142.388081.110980@d71g2000cwa.googlegroups.com...
[quoted text, click to view]


AddThis Social Bookmark Button