In VB6 the function is called this way
Private Sub CommandGetDeviceInfo_Click()
Dim dwError As Long
Dim dwInfoType As Long
Dim dwSize As Long
Dim byteBuf(64) As Byte
Dim longBuf(16) As Long
Dim szString As String
Dim dwCardPos As Long
Dim szCardPosDesc As String
Dim szPrinter As String
Select Case g_nConnectType
Case 0
szPrinter = Printer.DeviceName
Case 1
szPrinter = TextIP.Text
End Select
dwInfoType = ComboDeviceInfo.ListIndex
If dwInfoType = 0 Then
dwSize = 64
dwError = PAVO_GetDeviceInfo(szPrinter, PAVO_DEVINFO_MFG_SERIAL, byteBuf(0), dwSize)
szString = StrConv(byteBuf, vbUnicode)
MsgBox "Serial = " & szString, vbOKOnly, "Get Device Info"
ElseIf dwInfoType = 1 Then
dwSize = 64
dwError = PAVO_GetDeviceInfo(szPrinter, PAVO_DEVINFO_MODEL_NAME, byteBuf(0), dwSize)
szString = StrConv(byteBuf, vbUnicode)
MsgBox "Model = " & szString, vbOKOnly, "Get Device Info"
ElseIf dwInfoType = 2 Then
dwSize = 64
dwError = PAVO_GetDeviceInfo(szPrinter, PAVO_DEVINFO_FIRMWARE_VERSION, byteBuf(0), dwSize)
szString = StrConv(byteBuf, vbUnicode)
MsgBox "FW version = " & szString, vbOKOnly, "Get Device Info"
ElseIf dwInfoType = 3 Then
dwSize = 64
dwError = PAVO_GetDeviceInfo(szPrinter, PAVO_DEVINFO_RIBBON_INFO, longBuf(0), dwSize)
MsgBox "Ribbon Type = " & vbLf & vbLf & longBuf(0) & "Remain ribbon = " & longBuf(1), vbOKOnly, "Get Device Info"
ElseIf dwInfoType = 4 Then
dwSize = 64
dwError = PAVO_GetDeviceInfo(szPrinter, PAVO_DEVINFO_PRINT_COUNT, longBuf(0), dwSize)
MsgBox "Printed card = " & longBuf(0), vbOKOnly, "Get Device Info"
ElseIf dwInfoType = 5 Then
dwSize = 4
dwError = PAVO_GetDeviceInfo(szPrinter, PAVO_DEVINFO_CARD_POSITION, dwCardPos, dwSize)
Select Case dwCardPos
Case 0
szCardPosDesc = "Out of printer"
Case 1
szCardPosDesc = "Start printing position"
Case 2
szCardPosDesc = "Mag out position"
Case 3
szCardPosDesc = "Mag in position"
Case 4
szCardPosDesc = "Contact encoder position"
Case 5
szCardPosDesc = "Contactless encoder position"
Case 6
szCardPosDesc = "Flipper position"
Case 7
szCardPosDesc = "Card jam"
Case 8
szCardPosDesc = "Standby position"
End Select
MsgBox "Card position = " & dwCardPos & vbLf & vbLf & szCardPosDesc, vbOKOnly, "Get Device Info"
End If
End Sub