点击发票提取,aisino30OpenSql设置断点,看到有3个值,尝试调用下这个函数
用delphi写个测试程序
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
function aisino30OpenSql(p1, p2, p3, p4, p5, p6, p7: PAnsiChar): Integer; stdcall; external 'Aisino30DBCollector_V2.dll';
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
p1, p2, p3, p4, p5, p6, p7: PAnsiChar;
begin
aisino30OpenSql(p1, p2, p3, p4, p5, p6, p7);
end;
end.
od调试
可以进来,红线的地方就报地址错误了,加上3个参数值试试,一样子的错误提示,那有可能参数个数不对,减少,一直到没有地址错误的时候,6个参数
aisino30OpenSql(p1, p2, p3, p4, p5,p6);
首先的启动引擎
function startDataEngine(): Integer; stdcall; external 'Aisino30DBCollector_V2.dll';
提示4101错误,屏蔽这个错误,重新调用
居然出来结果了,但是在delphi里面运行还是有个错误,脱离调试就没有问题,尝试调整下参数个数再看看,不行,跟踪发现有个返回地址
的需要学习下汇编看看这个参数到底是几个了,今天还行能查询出结果来了,待以后再继续分析下