c ++ dll interfaces de prototype: int CheckSN (const char * infolist, char * msg);
c # appels en:
[DllImport ( "sncplusInterface.dll", EntryPoint = "CheckSN", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
public static extern int CheckSN (string infolist, StringBuilder msg);
Appel est:
StringBuilder chOutMsg = new StringBuilder (1024);
CheckSN (chData, chOutMsg / * ref chOutMsg * /);
string str = chOutMsg.ToString ();
Avec l'arbitre ou sur mot-clé accident