Blue
Red
Green
Orange
Voilet
Slate
Dark

delphi中byte 的赋值(100分)

  • 主题发起人 andrew4031
  • 开始时间
A

andrew4031

Unregistered / Unconfirmed
GUEST, unregistred user!
校验密码 密码是:224127
Function PassIcDev() As Integer
Dim Password(2) As Byte
Password(0) = &h22
Password(1) = &h41
Password(2) = &h27
st = csc_4442(icdev, 3, Password(0))
If st < 0 then

'用ffffff校验
Password(0) = &HFF
Password(1) = &HFF
Password(2) = &HFF
st = csc_4442(icdev, 3, Password(0))
Password(0) = &h22
Password(1) = &h41
Password(2) = &h27
st = wsc_4442(icdev, 3, Password(0))
If st < 0 then
PassIcDev = CardErr
else
PassIcDev = CardOk
End If
else
PassIcDev = CardOk
End If
End Function
上面的代码如何在中delphi实现
 
G

guoyabin2000

Unregistered / Unconfirmed
GUEST, unregistred user!
function PassIcDev(): Integer;
var
Password: Array[0..2] of Byte;
begin
Password(0) := $22;
Password(1) := $41;
Password(2) := $27;
st := csc_4442(icdev, 3, Password(0));
if st < 0 then
begin
Password(0) := $22;
Password(1) := $41;
Password(2) := $27;
st = csc_4442(icdev, 3, Password(0));
Password(0) := $22;
Password(1) := $41;
Password(2) := $27;
st = wsc_4442(icdev, 3, Password(0));
If st < 0 then
PassIcDev := CardErr
else
PassIcDev := CardOk;

end
else
begin
PassIcDev = CardOk;
end;
end;
 
J

jeffrey_s

Unregistered / Unconfirmed
GUEST, unregistred user!
Delphi 数组 赋值
用: Password[0] := $22;
而不是: Password(0) := $22;
 
N

NbBoy

Unregistered / Unconfirmed
GUEST, unregistred user!
轻问一下数值前加个$是什么意思?
 

Similar threads

S
回复
0
查看
1K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
933
SUNSTONE的Delphi笔记
S
I
回复
0
查看
542
import
I
I
回复
0
查看
515
import
I
顶部 底部