Delphi写的DLL,c#中如何调用?
delphi的dll代码如下:
procedure GetSystemCode( result:pchar);stdcall;
var
CPUID : TCPUID;
I : Integer;
m_cpuid : string;
m_biosinfo:string;
RBD: TRomBiosDump;
CSTR:String;
begin
。。。
c#调用方法:
[DllImport("CryLibray.dll")]
public static extern void GetSystemCode(byte[] str);
-----------------------------------------------------------------
怎么出现这样的错误呀?
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
谢谢