悬赏园豆:50
[已关闭问题]
关闭于 2007-11-27 15:14
<P>delphi中函数定义如下:<BR>Funcation WIS_VerifyTemplate(hInit:Thandle; RawTemplate:PChar; EnrlTemplate:PChar; security:LongInt; score:Pointer):LongInt;</P>
<P>c#中调用 <BR>[DllImport("Wis_Api.dll", EntryPoint = "WIS_VerifyTemplate", <BR> CallingConvention=CallingConvention.StdCall)]<BR> public unsafe static extern int VerifyFingerprint(long hInit, string source, string des, int secruity, object score);<BR><BR>static void Main(string[] args)<BR>{<BR> try<BR> {<BR> object score = new object();<BR> long hInit = 1;</P>
<P> int val = VerifyFingerprint(hInit, "TEST", "test", 2, score);<BR> Console.WriteLine("score:{0},return value:{1}", score, val.ToString());<BR> }<BR> catch (Exception ex)<BR> {<BR> Console.WriteLine(ex.Message);<BR> }<BR>}<BR><BR>错误信息:Attempted to read or write protected memory. This is often an indication that other memory is corrupt.<BR>请各位高手帮小弟看看错误原因为何啊?<BR></P>
小树爸爸
|
菜鸟二级
|
园豆:
210
提问于:2007-11-27 13:40