Module Module1
    Const USER_DEFINE_ERROR = &HE0000000
    Const INSUFFICIENT_MOMORY_AVAILABLE = &HE0000001
    Const HIDD_GETATTRIBUTES_FAIL = &HE0000002
    Const CANNOT_FINDE_THE_DEVICE_SPECIFIED = &HE0000003
    Const SEND_DEVICE_CHECKCODE_FAIL = &HE0000004
    Const GET_DEVICE_CHECKCODE_FAIL = &HE0000005
    Const CHECK_DEVICE_CHECKCODE_FAIL = &HE0000006
    Const CALL_WRITE_DATA_TIMEOUT = &HE0000007
    Const CALL_READ_DATA_TIMEOUT = &HE0000008
    Const ALLOCATE_DEVICE_QUEUE_FAIL = &HE0000009
    Const GET_INPUT_REPORT_SIZE_FAIL = &HE000000A
    Const DELETE_INPUT_QUEUE_FAIL = &HE000000B
    Const HIDD_GETPREPARSEDDATA_FAIL = &HE000000C
    Const SET_INPUT_REPORT_SIZE_FAIL = &HE000000D
    
    Public Structure MW_EasyPOD
        Public VID As UInteger
        Public PID As UInteger
        Public ReadTimeOut As UInteger
        Public WriteTimeOut As UInteger
        Public Handle As UInteger              ' Do not modify this value, reserved for DLL
        Public FeatureReportSize As UInteger   ' Do not modify this value, reserved for DLL
        Public InputReportSize As UInteger     ' Do not modify this value, reserved for DLL
        Public OutputReportSize As UInteger    ' Do not modify this value, reserved for DLL
    End Structure

    Public Declare Function ConnectPOD Lib "EasyPOD.DLL" (ByRef m_EasyPod As MW_EasyPOD, ByVal Index As UInteger) As UInteger
    Public Declare Function DisconnectPOD Lib "EasyPOD.DLL" (ByRef m_EasyPod As MW_EasyPOD) As UInteger
    Public Declare Function WriteData Lib "EasyPOD.DLL" (ByRef m_EasyPod As MW_EasyPOD, ByRef lpString As Byte, ByVal lToWrite As UInteger, ByRef lWritten As UInteger) As UInteger
    Public Declare Function ReadData Lib "EasyPOD.DLL" (ByRef m_EasyPod As MW_EasyPOD, ByRef lpString As Byte, ByVal lToRead As UInteger, ByRef lRead As UInteger) As UInteger
    Public Declare Function ClearPODBuffer Lib "EasyPOD.DLL" (ByRef m_EasyPod As MW_EasyPOD) As UInteger

End Module
