ACR89U-A1 – Reference Manual
Version 1.04
www.acs.com.hk
Page 42 of 57
error, if any. See also
Example:
4.2.2.2. AS_Close
This function closes a logical connection to ACR89.
AS_STATUS AS_DECL
AS_Close
(
IN INT nDevId);
Parameters
nDevId
[in] Handle returned by a previous call to
AS_Open
.
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 error,
if any. See also
or the possible return codes.
Example:
INT nDid;
AS_STATUS status;
//open a connection to the ACR89
status = AS_Open(ACR89,AS_USB1,&nDid);
if(status.DllError == CMD_SUCCESS) {
// connection success, do something with the ACR89
}
Else {
// error occurred
return status;
}
INT nDid;
AS_STATUS status;
//open a connection to the ACR89
status = AS_Open(ACR89, AS_USB1, &nDid);
if(status.DllError == CMD_SUCCESS) {
//connection success, do something
.
.
.
//done, close connection
status = AS_Close(nDid);
}
else {
//error occurred
return status;
}