R
Romain TAILLANDIER
Hi group
I have a C++ dll containing the following functions :
extern APIENTRY WINAPI void F1(CString str1,CString str2)
{
F2(str1,str2);
}
/*intern*/ void F2(CString str1,CString str2)
{
//do stuffs ..;
}
I have this C# code :
[DllImport("my.dll", EntryPoint = "F1")]
public static extern bool csFct(string s1 ,string s2);
When i call to csFct passing two string in parameter, I get the call of F1
correctly in the DLL, but it bug when calling F2.
I suppose it is due to marshalling poblems, but i am newbie to that, so
please help
how can i convert internally my strings to CStrings inside the F1 fonction,
where they are allready CStrings... ?
it is confusing for me.
thank you for help.
ROM
I have a C++ dll containing the following functions :
extern APIENTRY WINAPI void F1(CString str1,CString str2)
{
F2(str1,str2);
}
/*intern*/ void F2(CString str1,CString str2)
{
//do stuffs ..;
}
I have this C# code :
[DllImport("my.dll", EntryPoint = "F1")]
public static extern bool csFct(string s1 ,string s2);
When i call to csFct passing two string in parameter, I get the call of F1
correctly in the DLL, but it bug when calling F2.
I suppose it is due to marshalling poblems, but i am newbie to that, so
please help
how can i convert internally my strings to CStrings inside the F1 fonction,
where they are allready CStrings... ?
it is confusing for me.
thank you for help.
ROM