W
wu7509
Unregistered / Unconfirmed
GUEST, unregistred user!
function ckey_4442(icdev:longint;offset:smallint;password:array of integer):smallint;
stdcall; far;external 'YJRDIC.DLL' name 'ckey_4442';
function rdstr_4442(icdev:longint;offset:smallint;len:smallint;databuff:array of integer):smallint;
stdcall; far;external 'YJRDIC.DLL' name 'rdstr_4442';
function wrstr_4442(icdev:longint;offset:smallint;len:smallint;databuff:array of integer):smallint;
stdcall; far;external 'YJRDIC.DLL' name 'wrstr_4442';
function check_cardtype(icdev: longint; cardtype:array of integer):smallint;
stdcall; far;external 'YJRDIC.DLL' name 'check_cardtype';
//读
st:= rdstr_4442(1, 0 + i * 32, 32, recbuf);
//检验密码
for i:=1 to 6 do password:=1;
st:=ckey_4442(1, 3, password);
If st=0 Then memo1.lines.Add('检密码成功!')
else showmessage(inttostr(st));
//写
recbuf[0]:=ord('A'); recbuf[1]:=ord('B');
st:= wrstr_4442(1, 0 + 2 * 32, 32, recbuf);
If st=0 Then memo1.lines.Add('写成功!')
else showmessage(inttostr(st));
以上程序"读"与"检验密码"都能成功. 但第三段写不能成功!!
请高手们查看原因.谢谢!
stdcall; far;external 'YJRDIC.DLL' name 'ckey_4442';
function rdstr_4442(icdev:longint;offset:smallint;len:smallint;databuff:array of integer):smallint;
stdcall; far;external 'YJRDIC.DLL' name 'rdstr_4442';
function wrstr_4442(icdev:longint;offset:smallint;len:smallint;databuff:array of integer):smallint;
stdcall; far;external 'YJRDIC.DLL' name 'wrstr_4442';
function check_cardtype(icdev: longint; cardtype:array of integer):smallint;
stdcall; far;external 'YJRDIC.DLL' name 'check_cardtype';
//读
st:= rdstr_4442(1, 0 + i * 32, 32, recbuf);
//检验密码
for i:=1 to 6 do password:=1;
st:=ckey_4442(1, 3, password);
If st=0 Then memo1.lines.Add('检密码成功!')
else showmessage(inttostr(st));
//写
recbuf[0]:=ord('A'); recbuf[1]:=ord('B');
st:= wrstr_4442(1, 0 + 2 * 32, 32, recbuf);
If st=0 Then memo1.lines.Add('写成功!')
else showmessage(inttostr(st));
以上程序"读"与"检验密码"都能成功. 但第三段写不能成功!!
请高手们查看原因.谢谢!