Please tall person to give directions, DELPHI code to VB code, all access methods are unable to obtain normal data,
Interface
Const
_KEYA=$00;
_KEYB=$4.
Type
TMydata=https://bbs.csdn.net/topics/array [1.. 15, 0.. 3] of the string.
TParaBuf=record
ComNo: integer;
Baud: integer;
Sys_Sec: array [3] 1.. of integer;
User_Sec: array [1.. 5] of integer;
AuthorNo: array [6] 1.. of PChar;
UserSec: array [6] 1.. of integer;
end;
TPParaBuf=^ TParaBuf;
{-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -}
TCardInfo=record
PublishedDate: string [33];
ExpiredDate: string [33];
CardNo: string [33];
CardClass: string [33];
end;
TPCardInfo=^ TCardInfo;
{-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --}
TICCardBuf=record
_Key: Integer;
Key: array [15] 1.. of PAnsiChar;
Sector: array [15] 1.. of Integer;
Block: array [1.. 15, 0.. 3] of Integer;
SectorInfo: array [1.. 15, 0.. 3] of PAnsiChar;
BlockStr: PAnsiChar;
end;
TPICCardBuf=^ TICCardBuf;
The function ReadICCardInfo (buf: TPParaBuf; Var Card: TPICCardBuf) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function WriteICCardInfo (buf: TPParaBuf; Card: TPICCardBuf) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function ReadAuthorCard (buf: TPParaBuf) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function SaveCardKey (p1: PAnsiChar) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function the Authorize (buf: TPParaBuf; WType: integer=0) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function UnAuthorize (buf: TPParaBuf) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function GetCardInfo (buf: TPParaBuf; Var p1: TCardInfo) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function SetCardInfo (buf: TPParaBuf; P1: TCardInfo) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function the GetBalance (buf: TPParaBuf; Var Money: real) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function SetBalance (buf: TPParaBuf; Money: real) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function GetCardNo (buf: TPParaBuf; P1: PAnsiChar) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function SetCardNo (buf: TPParaBuf; P1: PAnsiChar) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function GetCardClass (buf: TPParaBuf; P1: PAnsiChar) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function SetCardClass (buf: TPParaBuf; P1: PAnsiChar) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function GetPublishedDate (buf: TPParaBuf; P1: PAnsiChar) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function SetPublishedDate (buf: TPParaBuf; P1: PAnsiChar) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function GetExpiredDate (buf: TPParaBuf; P1: PAnsiChar) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function SetExpiredDate (buf: TPParaBuf; P1: PAnsiChar) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function ClearCardInfo (buf: TPParaBuf) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function GetErrMsg (buf: TPParaBuf; ErrNo: integer; P1: PAnsiChar) : Boolean; Export; Stdcall; External 'pcsCardDll. DLL';
The function getNo (buf: TPParaBuf; P1: PAnsiChar) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function CSBeep (buf: TPParaBuf) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function GetSec (buf: TPParaBuf; P1, p2, p3: PAnsiChar; The Sec: integer; WType: integer=0) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
The function SetSec (buf: TPParaBuf; P1, p2, p3: PAnsiChar; The Sec: integer; WType: integer=0) : integer; Export; Stdcall; External 'pcsCardDll. DLL';
Implementation
End.
Into the VB code after
Option Explicit
Global Const KEYA=& amp; H0
Global Const KEYB=& amp; H4
The Public Type TCardData
TCardStr (1 To 15, 0 To 3) As String
End Type
The Public Type TParaBuf
ComNo As Integer
Baud As Integer
Sys_Sec (1 To 3) As an Integer
User_Sec (1 To 5) As an Integer
AuthorNo (1 To 6) As Byte
UserSec (1 To 6) As an Integer
End Type
The Public Type TCardInfo
PublishedDate As String * 32
ExpiredDate As String * 32
CardNo As String * 32
CardClass As String * 32
End Type
The Public Type TICCardBuf
OriKey As Integer
Key (1 To 15) As Byte
Sector (1 To 15) As an Integer
Block (1 To 15, 0 To 3) As an Integer
SectorInfo (1 To 15, 0 To 3) As Byte
BlockStr As Byte
End Type
'* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
'as
'* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull