定义:
[DllImport("BSEncrypt.dll")]
public static extern bool MD5String(ref string instr, int inlen, ref string outstr, int outlen);
调用:
String ls_MD5Password = new String('\0', 100);
string as_Password = userid + pwd;
var loginCheck = BSEncrypt.MD5String(ref as_Password, as_Password.Length, ref ls_MD5Password, 100);
错误:
“System.AccessViolationException”类型的未经处理的异常在 未知模块。 中发生
其他信息: 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。