Problem using C++ DLL functions in C# code
[DllImport(pathimportdll)]
static extern int InitiateSession(ref _SESSION_INFO sinfo, ref _DEVICE_INFO pDevInfo);
[DllImport(pathimportdll)]
static extern int StartAcquisition();
DLL functions are imported properly. After the call, application is asserting in tcscpy.inl with t开发者_JAVA百科he message Expression: (L"Buffer is too small" && 0).
*
"DLL functions are imported properly"
*
that's most likely debatable. one way to be sure is to comment out your dllimport code and not invoke it. if you don't get the error then one can most likely assume your import declarations are not quite correct.
精彩评论