Hello,
I am a newbie to .Net programming, but here it goes..
There is a native C++ .DLL which i developed as a wrapper around a VB .Net assembly.
In the C++ DLL there is an exported function:
__declspec(dllexport) int __stdcall MyFunc(char *str1,char *str2)
which calls a function inside the VB assembly with the following signature:
function MyVBFunc( ByVal s1 as String, ByVal s2 as String) as String
1) How do I call MyVBFunc from native C++ so that str1 and str2 are converted to CLR String objects ?
2) How can the returned String from MyVBFunc be marshalled back into a char * visible to the MyFunc caller?
I mention that the C++ DLL is and must contain 100% non-managed code, the VB assembly contains a COM class and the DLL calls it by instantiating a COM object with CoCreateInstance.
Thank you so much
I am a newbie to .Net programming, but here it goes..
There is a native C++ .DLL which i developed as a wrapper around a VB .Net assembly.
In the C++ DLL there is an exported function:
__declspec(dllexport) int __stdcall MyFunc(char *str1,char *str2)
which calls a function inside the VB assembly with the following signature:
function MyVBFunc( ByVal s1 as String, ByVal s2 as String) as String
1) How do I call MyVBFunc from native C++ so that str1 and str2 are converted to CLR String objects ?
2) How can the returned String from MyVBFunc be marshalled back into a char * visible to the MyFunc caller?
I mention that the C++ DLL is and must contain 100% non-managed code, the VB assembly contains a COM class and the DLL calls it by instantiating a COM object with CoCreateInstance.
Thank you so much
Last edited: