Click here to Skip to main content
15,905,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can anybody explain me how do we use DLLImport in C# for user defined functions. i.e
I have a function GetMessage() defined in VB6.0.
I know, I can import it using TLBIMP.exe. Can I use the function using DLLImport in c#. If I can, what are the steps required to do so.

Please explain
Posted
Comments
Toli Cuturicu 12-Oct-10 11:55am    
Don't post fake answers! This is cheating!

1 solution

something like:

C#
[DllImport("TestLib.dll",CallingConvention=CallingConvention.Cdecl)]
public static extern string GetMessage(  );

perhaps?

you'd have to double check the calling convention from c# to VB
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900