I
iseeks
Unregistered / Unconfirmed
GUEST, unregistred user!
我新建了一个application,在form内添加一个button控件,在button的onclick事件中调用SafeEngine.dll(用VC编写)中的SEH_InitialSession过程,<br>可是运行时会报如下错误:Access violation at address 1000C8B1 in module 'SafeEngine.dll'.Write of address 00000002.<br>请问主要是哪方面出错啦?<br><br>我的调用源码如下:<br>unit Unit1;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, <br><br>Forms,<br> Dialogs, StdCtrls;<br>procedure SEH_InitialSession(PriKeyDevType: Integer; const <br><br>strPrivKeyDevParam: WideString;<br> const strPriKeyPass: WideString; <br><br>lPriKeyTimeout: Integer;<br> CertChainDevType: Integer; const <br><br>strCertChainDevParam: WideString;<br> const strCertChainPass: <br><br>WideString);StdCall;<br>type<br> TForm1 = class(TForm)<br> Button1: TButton;<br> procedure Button1Click(Sender: TObject);<br> private<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br><br>implementation<br>procedure SEH_InitialSession;external 'SafeEngine.dll' name <br><br>'SEH_InitialSession';<br>{$R *.dfm}<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br>SEH_InitialSession(2,'userkey.key','sheca',1000,2,'CertChain.spc','');<br>end;<br><br>end.<br>