Calling C++ DLL

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I need to call the followin function (that is placed in an additional DLL)
out of VB.NET code:

BOOL TestFunc(CString str1, CString str2)
{
[...]
}

How can I call this function out of VB.NET code? How do I declare the
parameters to match the ones in C++?

Thanks
Peter
 
How can I call this function out of VB.NET code?

You can't, not directly. You would have to wrap it with a function
that takes parameters of a string type that the CLR marshaler knows
about (char*, wchar_t* or BSTR), not CString.



Mattias
 
Back
Top