Attribute VB_Name = "Opos_h"
Option Explicit

'**********************************************************************************************************
' NAME:  Opos_h.BAS
' TITLE: General header file for OPOS applications.
' DESCR: This is the Visual Basic equivalent of the general header file for OPOS applications as provided
'        in the June 2001 release from Monroe.
'
' NOTES: 1)The Visual C++ name for this file is Opos.h
'        2)Is this ever required in the SO ?
'
'**********************************************************************************************************

'----------------------------------------------------------------------------------------------------------
' OPOS "State" Property Constants
'----------------------------------------------------------------------------------------------------------
Public Const OPOS_S_CLOSED As Long = 1
Public Const OPOS_S_IDLE As Long = 2
Public Const OPOS_S_BUSY  As Long = 3
Public Const OPOS_S_ERROR As Long = 4

'----------------------------------------------------------------------------------------------------------
' OPOS "ResultCode" Property Constants
'----------------------------------------------------------------------------------------------------------
Public Const OPOS_SUCCESS As Long = 0
Public Const OPOS_E_CLOSED As Long = 101
Public Const OPOS_E_CLAIMED As Long = 102
Public Const OPOS_E_NOTCLAIMED As Long = 103
Public Const OPOS_E_NOSERVICE As Long = 104
Public Const OPOS_E_DISABLED As Long = 105
Public Const OPOS_E_ILLEGAL As Long = 106
Public Const OPOS_E_NOHARDWARE As Long = 107
Public Const OPOS_E_OFFLINE As Long = 108
Public Const OPOS_E_NOEXIST As Long = 109
Public Const OPOS_E_EXISTS As Long = 110
Public Const OPOS_E_FAILURE As Long = 111
Public Const OPOS_E_TIMEOUT As Long = 112
Public Const OPOS_E_BUSY As Long = 113
Public Const OPOS_E_EXTENDED As Long = 114

Public Const OPOSERR As Long = 100                  ' Base for ResultCode errors.
Public Const OPOSERREXT As Long = 200               ' Base for ResultCodeExtendedErrors.


'----------------------------------------------------------------------------------------------------------
' OPOS "OpenResult" Property Constants
'----------------------------------------------------------------------------------------------------------

' The following can be set by the control object:
' ----------------------------------------------
Public Const OPOS_OR_ALREADYOPEN As Long = 301
' Control Object already open.

Public Const OPOS_OR_REGBADNAME As Long = 302
' The registry does not contain a key for the specified device name.

Public Const OPOS_OR_REGPROGID As Long = 303
' Could not read the device name key's default value, or could not convert this Prog ID to a valid
' Class ID.

Public Const OPOS_OR_CREATE As Long = 304
' Could not create a service object instance, or could not get its IDispatch interface.

Public Const OPOS_OR_BADIF As Long = 305
' The service object does not support one or more of the method required by its release.

Public Const OPOS_OR_FAILEDOPEN As Long = 306
' The service object returned a failure status from its open call, but doesn't have a more specific
' failure code.

Public Const OPOS_OR_BADVERSION As Long = 307
' The service object major version number is not 1.


' The following can be returned by the service object if it returns a failure status from its open call:
' -----------------------------------------------------------------------------------------------------

Public Const OPOS_ORS_NOPORT As Long = 401
' Port access required at open, but configured port is invalid or inaccessible.

Public Const OPOS_ORS_NOTSUPPORTED As Long = 402
' Service Object does not support the specified device.

Public Const OPOS_ORS_CONFIG As Long = 403
' Configuration information error.

Public Const OPOS_ORS_SPECIFIC As Long = 450
' Errors greater than this value are SO-specific.


'----------------------------------------------------------------------------------------------------------
' OPOS "BinaryConversion" Property Constants
'----------------------------------------------------------------------------------------------------------
Public Const OPOS_BC_NONE As Long = 0
Public Const OPOS_BC_NIBBLE As Long = 1
Public Const OPOS_BC_DECIMAL As Long = 2


'----------------------------------------------------------------------------------------------------------
' "CheckHealth" Method: "Level" Parameter Constants
'----------------------------------------------------------------------------------------------------------
Public Const OPOS_CH_INTERNAL As Long = 1
Public Const OPOS_CH_EXTERNAL As Long = 2
Public Const OPOS_CH_INTERACTIVE As Long = 3

'----------------------------------------------------------------------------------------------------------
' OPOS "CapPowerReporting", "PowerState", "PowerNotify" Property Constants
'----------------------------------------------------------------------------------------------------------
Public Const OPOS_PR_NONE As Long = 0
Public Const OPOS_PR_STANDARD As Long = 1
Public Const OPOS_PR_ADVANCED As Long = 2

Public Const OPOS_PN_DISABLED As Long = 0
Public Const OPOS_PN_ENABLED As Long = 1

Public Const OPOS_PS_UNKNOWN As Long = 2000
Public Const OPOS_PS_ONLINE As Long = 2001
Public Const OPOS_PS_OFF As Long = 2002
Public Const OPOS_PS_OFFLINE As Long = 2003
Public Const OPOS_PS_OFF_OFFLINE As Long = 2004

'----------------------------------------------------------------------------------------------------------
' "ErrorEvent" Event: "ErrorLocus" Parameter Constants
'----------------------------------------------------------------------------------------------------------
Public Const OPOS_EL_OUTPUT As Long = 1
Public Const OPOS_EL_INPUT As Long = 2
Public Const OPOS_EL_INPUT_DATA As Long = 3

'----------------------------------------------------------------------------------------------------------
' "ErrorEvent" Event: "ErrorResponse" Constants
'----------------------------------------------------------------------------------------------------------
Public Const OPOS_ER_RETRY As Long = 11
Public Const OPOS_ER_CLEAR As Long = 12
Public Const OPOS_ER_CONTINUEINPUT As Long = 13

'----------------------------------------------------------------------------------------------------------
' "StatusUpdateEvent" Event: Common "Status" Constants
'----------------------------------------------------------------------------------------------------------
Public Const OPOS_SUE_POWER_ONLINE As Long = 2001
Public Const OPOS_SUE_POWER_OFF As Long = 2002
Public Const OPOS_SUE_POWER_OFFLINE As Long = 2003
Public Const OPOS_SUE_POWER_OFF_OFFLINE As Long = 2004

'----------------------------------------------------------------------------------------------------------
' General Constants
'----------------------------------------------------------------------------------------------------------
Public Const OPOS_FOREVER As Long = -1

