J
jxh_ty
Unregistered / Unconfirmed
GUEST, unregistred user!
使用华大usbkey,写个简单程序调用其提供的dll,可以正常连接,同样的语句用actieform控件方式来调用,就不能连接了,怎么回事?function HSConnectDev(szDevName: PChar;
phCard: pointer): DWORD;
stdcall;
external 'HD_GPAPI.dll';procedure TActiveFormX.Button1Click(Sender: TObject);var hHandleointer;begin
Edit1.Text:=IntToStr(HSConnectDev('USB1', @hHandle));end;
正常返回值是0,结果总返回102。这个语句放在普通程序中没问题!
phCard: pointer): DWORD;
stdcall;
external 'HD_GPAPI.dll';procedure TActiveFormX.Button1Click(Sender: TObject);var hHandleointer;begin
Edit1.Text:=IntToStr(HSConnectDev('USB1', @hHandle));end;
正常返回值是0,结果总返回102。这个语句放在普通程序中没问题!