V
vladislavf
Hi All,
I need to pass array of strings from C++/CLI to unmanaged C++ function.
(The unmanaged API signatire is : int Combine(int NumOfInputFiles,
wchar_t **names) and I want to call it from C++/CLI code by using C++
Interop )
But unfortunately I have only one day experience in C++/CLI so all my
attempts are failing.
I'm trying something like that:
array<String^> ^fileNames = gcnew array<String^>(3);
fileNames[0]="vladi";
fileNames[1]="anna";
//convert .net string to wchar_t ptr
pin_ptr<const wchar_t> wch = PtrToStringChars(str);
then I call unmanged code (which's in separate dll)
int retVal = Combine(3, &wch);
But it fails in compilation.
Please help !
Thank you in advance!!
I need to pass array of strings from C++/CLI to unmanaged C++ function.
(The unmanaged API signatire is : int Combine(int NumOfInputFiles,
wchar_t **names) and I want to call it from C++/CLI code by using C++
Interop )
But unfortunately I have only one day experience in C++/CLI so all my
attempts are failing.
I'm trying something like that:
array<String^> ^fileNames = gcnew array<String^>(3);
fileNames[0]="vladi";
fileNames[1]="anna";
//convert .net string to wchar_t ptr
pin_ptr<const wchar_t> wch = PtrToStringChars(str);
then I call unmanged code (which's in separate dll)
int retVal = Combine(3, &wch);
But it fails in compilation.
Please help !
Thank you in advance!!