71
Private
Sub
Form_Load()
'-1673527296 Come from c code (40000 <<16)
ADV_OPEN_CTL_CODE = CTL_CODE(-1673527296, &H900, METHOD_BUFFERED, FILE_ANY_ACCESS)
ADV_STATUS_CTL_CODE = CTL_CODE(-1673527296, &H901, METHOD_BUFFERED, FILE_ANY_ACCESS)
DeviceHandle = CreateFile(
"\\.\ADVSYS"
, GENERIC_READ
Or
GENERIC_WRITE, FILE_SHARE_READ
Or
FILE_SHARE_WRITE, SA, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0)
If
DeviceHandle = INVALID_HANDLE_VALUE
Then
'Failed to Open Cash Drawer Driver
MsgBox(
"Error opening ADVSYS.sys. Error = "
& Err.LastDllError)
End
If
End
Sub
Private
Sub
Command1_Click()
Dim
iBytesRtn
As
Long
Dim
iRet
As
Integer
, iDrawer
As
Integer
' Open Drawer #1
iDrawer = &H1
iRet = DeviceIoControl(DeviceHandle, ADV_OPEN_CTL_CODE, iDrawer, 4, 0, 0, iBytesRtn, SA1)
If
(iRet = 0
Or
iBytesRtn <> 1)
Then
MsgBox(
"Error opening ADVSYS.sys. Error = "
& Err.LastDllError)
End
If
End
Sub
Private
Sub
Command2_Click()
Dim
iBytesRtn
As
Long
Dim
iRet
As
Integer
, iDrawer
As
Integer
' Open Drawer #2
iDrawer = &H2
iRet = DeviceIoControl(DeviceHandle, ADV_OPEN_CTL_CODE, iDrawer, 4, 0, 0, iBytesRtn, SA1)
If
(iRet = 0
Or
iBytesRtn <> 1)
Then
MsgBox(
"Error opening ADVSYS.sys. Error = "
& Err.LastDllError)
End
If
End
Sub
Private
Sub
Timer1_Timer()
Dim
iBytesRtn
As
Long
Dim
iRet
As
Integer
, iStatus
As
Integer
' Get Drawer Status
iRet = DeviceIoControl(DeviceHandle, ADV_STATUS_CTL_CODE, 0, 0, iStatus, 4, iBytesRtn, SA1)
If
(iRet = 0
Or
iBytesRtn <> 1)
Then
Timer1.Enabled =
False
MsgBox(
"Error opening ADVSYS.sys. Error = "
& Err.LastDllError)
End
If
If
(iStatus = 0)
Then
Label1.Caption =
"Cash Drawer(s) Closed"
Else
Label1.Caption =
"Cash Drawer(s) Open"
End
If
End Sub
Summary of Contents for EP-55XX-AR10
Page 14: ...7 EP 55XX Series with 8 9 2nd Display Dimensions Unit mm...
Page 42: ...35 Jumper and Connector Locations of PEB 973D For EP 55XX AR20...
Page 46: ...39 Jumper and Connector Locations of INS8313B and GA D525E C6 For EP 55XX AR30 40...
Page 62: ...55 8 When installation is complete the WLAN utility will automatically appear on the desktop...
Page 71: ...64 7 Click Finish on the Installation Complete screen...