views:

190

answers:

4

I have a C++ app in VS2005 and import a VB DLL. IntelliSense shows me all the symbols in the DLL as expected but it also shows all (or nearly all) of them again with an underscore prefix (no @s in them though). Why is this? What are the differences between the underscored items and the normal items?

A: 

In (some) c# coding standards the underscore prefix denotes a private variable, that might explain it... is it VB or VB.Net?

Omar Kooheji
Old school VB, not vb.net. I don't think it's a convention, since they don't appear written like that in the original VB.
A: 

Are the symbols properties? If so, these might just be the private variables backing the properties.

Jacob
All symbols: structs, vars etc.
+3  A: 

Assuming you're talking VB6, the leading underscore version _Klass is the Vb-generated default interface for the class Klass. This site has a nice explanation: http://www.15seconds.com/issue/040721.htm

tragomaskhalos
Excellent. Thank you! :-)
A: 

Check out this wiki article on Name Mangling for an indepth look:

http://en.wikipedia.org/wiki/Name_mangling

QAZ