ACR89U-A1 – Reference Manual
Version 1.04
www.acs.com.hk
Page 41 of 57
Note:
1. The area to write into must be erased first.
2. The erase operation is in unit of block where the size of each block is 64 kbytes.
3.
For erase operation, only the higher significant two bytes is used. The low significant two
bytes of the address is ignored. i.e. 64 kbytes address aligned.
4.2. ACR89 DLL API Functions
4.2.1.
General Description
All functions return a status code
AS_STATUS
, which is a structure consisting of a DLL defined error
and a WIN32 error. See also section 2.3.1 for more information about the AS_STATUs structure.
Code
AS_STATUS.DllError
==
CMD_SUCCESS
means success.
AS_STATUS.W32Error
is defined
and used to provide additional error information to developers only when
AS_STATUS.DllError !=
CMD_SUCCESS
. The API functions are classified into seven categories according to the type of
accessories they will control as follows:
•
Port Functions
•
Device Functions
•
LCD Functions
•
Keypad Functions
•
Real-Time Clock Functions
•
Script Functions
•
Other Functions
4.2.2.
Port Functions
4.2.2.1. AS_Open
This function opens a logical connection to ACR89. This function must be called before calling any
other API function.
A
S_STATUS AS_DECL
AS_Open
(
IN INT nReaderType,
IN INT nPort,
OUT INT *nDevId);
Parameters:
nReaderType
[in] Must be ACR89 (00h, as defined in acr89.h).
nPort
[in] The instance of the reader connected to USB port. E.g.
AS_USB1
refers to
the first connected ACR89 detected by the PC. See also
Section 4.1.1.1
Numbers” for possible options.
nDevId
[out] Handle to be returned upon successful creation of the connection. This
handle will be used in all the subsequent calls to other API functions.
Return Values
AS_STATUS
This functions returns different values depending on whether it succeeds or fails.
AS_STATUS.DllError
contains the status as returned by the DLL.
AS_STATUS.W32Error
contains the Win32 error code associated with the DLL