Trouble with C#<->C++ DLLImport “Attempted to read or write protected memory.”
问题 I have a C++ dll which has a function within it I am trying to call from a C# application. Here's the code in the C++ header file extern "C" _declspec(dllexport) int LabelStoringSSDsim(int devNum, UCHAR serial[40], UCHAR wwn[40], UCHAR ConfigID[5], UCHAR FrmRev[8], UCHAR DevName[40], int eCode); Here's the code in the C++ source file int LabelStoringSSDsim(int devNum, UCHAR serialLbl[40], UCHAR wwnLbl[40], UCHAR ConfigID[5], UCHAR FrmRev[8], UCHAR DevName[40], int eCode) { string strConfigID=