I am writing a C# app that loads COM dlls and interrogates them for method information.
This works ok with .NET dlls, but I'm having trouble retrieving everything I need from VB 6.0 dlls. While I can get method name and return type, I can't get the HelpString either from the type or its properties.
I've been using the classes in the TLI namespace: TLI.TypeLibInfo, TLI.TypeInfo, TLI.InterfaceInfo and TLI.MemberInfo. TLI.MemberInfo has properties called HelpFile, HelpContext and HelpStringContext but they are always 0 or null.
Is there a way to get the help information this way?
If not, is there another way to get to it?
Loading
Bechir BejaouiPosted Apr 11, 2008, 6:11 AM
first, include System.Runtime.InteropServices;
then suppose that we need a method Hello(string sMessage) from a vb6 dll called HelloVb6.dll
[dllImport("HelloVb6.dll")]
public static extern void Hello(string sMessage);
the method have to be marked static, dont forget the keyword extern used in this case
Now, call the method within your code
public void Main()
{
Hello("I'm here, waiting for you!!!");
}