Calling C++ DLL

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
 
M

Mattias Sjögren

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top