Guidance
指路人
g.yi.org
software / rapidq / Examples / Devices / RS232 Serial Port / comdialer / tapi.inc

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
' The  Telephony  API  is jointly copyrighted by Intel and Microsoft.  You are
' granted  a royalty free worldwide, unlimited license to make copies, and use
' the   API/SPI  for  making  applications/drivers  that  interface  with  the
' specification provided that this paragraph and the Intel/Microsoft copyright
' statement is maintained as is in the text and source code files.
'
' Copyright 1995 Microsoft, all rights reserved.
' Portions copyright 1992, 1993 Intel/Microsoft, all rights reserved.

' typedef of the LINE callback procedure

' typedef void (CALLBACK * LINECALLBACK)  (byval hDevice as long,
'                          byval dwMessage as long,
'                          byval dwInstance as long,
'                          byval dwParam1 as long,
'                          byval dwParam2 as long,
'                          byval dwParam3 as long);

' typedef of the PHONE callback procedure

' typedef void (CALLBACK * PHONECALLBACK)  (byval hDevice as long,
'                          byval dwMessage as long,
'                          byval dwInstance as long,
'                          byval dwParam1 as long,
'                          byval dwParam2 as long,
'                          byval dwParam3 as long);


' Messages for Phones and Lines
     CONST LINE_CALLINFO = 1&
     CONST LINE_CALLSTATE = 2&
     CONST LINE_CLOSE = 3&
     CONST LINE_DEVSPECIFIC = 4&
     CONST LINE_DEVSPECIFICFEATURE = 5&
     CONST LINE_GATHERDIGITS = 6&
     CONST LINE_GENERATE = 7&
     CONST LINE_LINEDEVSTATE = 8&
     CONST LINE_MONITORDIGITS = 9&
     CONST LINE_MONITORMEDIA = 10&
     CONST LINE_MONITORTONE = 11&
     CONST LINE_REPLY = 12&
     CONST LINE_REQUEST = 13&
     CONST PHONE_BUTTON = 14&
     CONST PHONE_CLOSE = 15&
     CONST PHONE_DEVSPECIFIC = 16&
     CONST PHONE_REPLY = 17&
     CONST PHONE_STATE = 18&
     CONST LINE_CREATE = 19&
     CONST PHONE_CREATE = 20&

' Define Simple Telephony Constants.

'Const TAPI_REPLY = WM_USER + 99
     CONST TAPI_REPLY = &H400 + 99

     CONST TAPIERR_CONNECTED = 0&
     CONST TAPIERR_DROPPED = -1&
     CONST TAPIERR_NOREQUESTRECIPIENT = -2&
     CONST TAPIERR_REQUESTQUEUEFULL = -3&
     CONST TAPIERR_INVALDESTADDRESS = -4&
     CONST TAPIERR_INVALWINDOWHANDLE = -5&
     CONST TAPIERR_INVALDEVICECLASS = -6&
     CONST TAPIERR_INVALDEVICEID = -7&
     CONST TAPIERR_DEVICECLASSUNAVAIL = -8&
     CONST TAPIERR_DEVICEIDUNAVAIL = -9&
     CONST TAPIERR_DEVICEINUSE = -10&
     CONST TAPIERR_DESTBUSY = -11&
     CONST TAPIERR_DESTNOANSWER = -12&
     CONST TAPIERR_DESTUNAVAIL = -13&
     CONST TAPIERR_UNKNOWNWINHANDLE = -14&
     CONST TAPIERR_UNKNOWNREQUESTID = -15&
     CONST TAPIERR_REQUESTFAILED = -16&
     CONST TAPIERR_REQUESTCANCELLED = -17&
     CONST TAPIERR_INVALPOINTER = -18&


     CONST TAPIMAXDESTADDRESSSIZE = 80&
     CONST TAPIMAXAPPNAMESIZE = 40&
     CONST TAPIMAXCALLEDPARTYSIZE = 40&
     CONST TAPIMAXCOMMENTSIZE = 80&
     CONST TAPIMAXDEVICECLASSSIZE = 40&
     CONST TAPIMAXDEVICEIDSIZE = 40&


' Data types and values for Phones


     CONST PHONEBUTTONFUNCTION_UNKNOWN = &H0&
     CONST PHONEBUTTONFUNCTION_CONFERENCE = &H1&
     CONST PHONEBUTTONFUNCTION_TRANSFER = &H2&
     CONST PHONEBUTTONFUNCTION_DROP = &H3&
     CONST PHONEBUTTONFUNCTION_HOLD = &H4&
     CONST PHONEBUTTONFUNCTION_RECALL = &H5&
     CONST PHONEBUTTONFUNCTION_DISCONNECT = &H6&
     CONST PHONEBUTTONFUNCTION_CONNECT = &H7&
     CONST PHONEBUTTONFUNCTION_MSGWAITON = &H8&
     CONST PHONEBUTTONFUNCTION_MSGWAITOFF = &H9&
     CONST PHONEBUTTONFUNCTION_SELECTRING = &HA&
     CONST PHONEBUTTONFUNCTION_ABBREVDIAL = &HB&
     CONST PHONEBUTTONFUNCTION_FORWARD = &HC&
     CONST PHONEBUTTONFUNCTION_PICKUP = &HD&
     CONST PHONEBUTTONFUNCTION_RINGAGAIN = &HE&
     CONST PHONEBUTTONFUNCTION_PARK = &HF&
     CONST PHONEBUTTONFUNCTION_REJECT = &H10&
     CONST PHONEBUTTONFUNCTION_REDIRECT = &H11&
     CONST PHONEBUTTONFUNCTION_MUTE = &H12&
     CONST PHONEBUTTONFUNCTION_VOLUMEUP = &H13&
     CONST PHONEBUTTONFUNCTION_VOLUMEDOWN = &H14&
     CONST PHONEBUTTONFUNCTION_SPEAKERON = &H15&
     CONST PHONEBUTTONFUNCTION_SPEAKEROFF = &H16&
     CONST PHONEBUTTONFUNCTION_FLASH = &H17&
     CONST PHONEBUTTONFUNCTION_DATAON = &H18&
     CONST PHONEBUTTONFUNCTION_DATAOFF = &H19&
     CONST PHONEBUTTONFUNCTION_DONOTDISTURB = &H1A&
     CONST PHONEBUTTONFUNCTION_INTERCOM = &H1B&
     CONST PHONEBUTTONFUNCTION_BRIDGEDAPP = &H1C&
     CONST PHONEBUTTONFUNCTION_BUSY = &H1D&
     CONST PHONEBUTTONFUNCTION_CALLAPP = &H1E&
     CONST PHONEBUTTONFUNCTION_DATETIME = &H1F&
     CONST PHONEBUTTONFUNCTION_DIRECTORY = &H20&
     CONST PHONEBUTTONFUNCTION_COVER = &H21&
     CONST PHONEBUTTONFUNCTION_CALLID = &H22&
     CONST PHONEBUTTONFUNCTION_LASTNUM = &H23&
     CONST PHONEBUTTONFUNCTION_NIGHTSRV = &H24&
     CONST PHONEBUTTONFUNCTION_SENDCALLS = &H25&
     CONST PHONEBUTTONFUNCTION_MSGINDICATOR = &H26&
     CONST PHONEBUTTONFUNCTION_REPDIAL = &H27&
     CONST PHONEBUTTONFUNCTION_SETREPDIAL = &H28&
     CONST PHONEBUTTONFUNCTION_SYSTEMSPEED = &H29&
     CONST PHONEBUTTONFUNCTION_STATIONSPEED = &H2A&
     CONST PHONEBUTTONFUNCTION_CAMPON = &H2B&
     CONST PHONEBUTTONFUNCTION_SAVEREPEAT = &H2C&
     CONST PHONEBUTTONFUNCTION_QUEUECALL = &H2D&
     CONST PHONEBUTTONFUNCTION_NONE = &H2E&

     TYPE PHONEBUTTONINFO
      dwTotalSize AS LONG
      dwNeededSize AS LONG
      dwUsedSize AS LONG

      dwButtonMode AS LONG
      dwButtonFunction AS LONG

      dwButtonTextSize AS LONG
      dwButtonTextOffset AS LONG

      dwDevSpecificSize AS LONG
      dwDevSpecificOffset AS LONG

      dwButtonState AS LONG
     END TYPE

     CONST PHONEBUTTONMODE_DUMMY = &H1&
     CONST PHONEBUTTONMODE_CALL = &H2&
     CONST PHONEBUTTONMODE_FEATURE = &H4&
     CONST PHONEBUTTONMODE_KEYPAD = &H8&
     CONST PHONEBUTTONMODE_LOCAL = &H10&
     CONST PHONEBUTTONMODE_DISPLAY = &H20&

     CONST PHONEBUTTONSTATE_UP = &H1&
     CONST PHONEBUTTONSTATE_DOWN = &H2&
     CONST PHONEBUTTONSTATE_UNKNOWN = &H4&
     CONST PHONEBUTTONSTATE_UNAVAIL = &H8&

     TYPE PHONEEXTENSIONID
      dwExtensionID0 AS LONG
      dwExtensionID1 AS LONG
      dwExtensionID2 AS LONG
      dwExtensionID3 AS LONG
     END TYPE

     TYPE PHONECAPS
      dwTotalSize AS LONG
      dwNeededSize AS LONG
      dwUsedSize AS LONG

      dwProviderInfoSize AS LONG
      dwProviderInfoOffset AS LONG

      dwPhoneInfoSize AS LONG
      dwPhoneInfoOffset AS LONG

      dwPermanentPhoneID AS LONG
      dwPhoneNameSize AS LONG
      dwPhoneNameOffset AS LONG
      dwStringFormat AS LONG

      dwPhoneStates AS LONG
      dwHookSwitchDevs AS LONG
      dwHandsetHookSwitchModes AS LONG
      dwSpeakerHookSwitchModes AS LONG
      dwHeadsetHookSwitchModes AS LONG

      dwVolumeFlags AS LONG
      dwGainFlags AS LONG
      dwDisplayNumRows AS LONG
      dwDisplayNumColumns AS LONG
      dwNumRingModes AS LONG
      dwNumButtonLamps AS LONG

      dwButtonModesSize AS LONG
      dwButtonModesOffset AS LONG

      dwButtonFunctionsSize AS LONG
      dwButtonFunctionsOffset AS LONG

      dwLampModesSize AS LONG
      dwLampModesOffset AS LONG

      dwNumSetData AS LONG
      dwSetDataSize AS LONG
      dwSetDataOffset AS LONG

      dwNumGetData AS LONG
      dwGetDataSize AS LONG
      dwGetDataOffset AS LONG

      dwDevSpecificSize AS LONG
      dwDevSpecificOffset AS LONG

     END TYPE

     CONST PHONEERR_ALLOCATED = &H90000001
     CONST PHONEERR_BADDEVICEID = &H90000002
     CONST PHONEERR_INCOMPATIBLEAPIVERSION = &H90000003
     CONST PHONEERR_INCOMPATIBLEEXTVERSION = &H90000004
     CONST PHONEERR_INIFILECORRUPT = &H90000005
     CONST PHONEERR_INUSE = &H90000006
     CONST PHONEERR_INVALAPPHANDLE = &H90000007
     CONST PHONEERR_INVALAPPNAME = &H90000008
     CONST PHONEERR_INVALBUTTONLAMPID = &H90000009
     CONST PHONEERR_INVALBUTTONMODE = &H9000000A
     CONST PHONEERR_INVALBUTTONSTATE = &H9000000B
     CONST PHONEERR_INVALDATAID = &H9000000C
     CONST PHONEERR_INVALDEVICECLASS = &H9000000D
     CONST PHONEERR_INVALEXTVERSION = &H9000000E
     CONST PHONEERR_INVALHOOKSWITCHDEV = &H9000000F
     CONST PHONEERR_INVALHOOKSWITCHMODE = &H90000010
     CONST PHONEERR_INVALLAMPMODE = &H90000011
     CONST PHONEERR_INVALPARAM = &H90000012
     CONST PHONEERR_INVALPHONEHANDLE = &H90000013
     CONST PHONEERR_INVALPHONESTATE = &H90000014
     CONST PHONEERR_INVALPOINTER = &H90000015
     CONST PHONEERR_INVALPRIVILEGE = &H90000016
     CONST PHONEERR_INVALRINGMODE = &H90000017
     CONST PHONEERR_NODEVICE = &H90000018
     CONST PHONEERR_NODRIVER = &H90000019
     CONST PHONEERR_NOMEM = &H9000001A
     CONST PHONEERR_NOTOWNER = &H9000001B
     CONST PHONEERR_OPERATIONFAILED = &H9000001C
     CONST PHONEERR_OPERATIONUNAVAIL = &H9000001D
     CONST PHONEERR_RESOURCEUNAVAIL = &H9000001F
     CONST PHONEERR_REQUESTOVERRUN = &H90000020
     CONST PHONEERR_STRUCTURETOOSMALL = &H90000021
     CONST PHONEERR_UNINITIALIZED = &H90000022
     CONST PHONEERR_REINIT = &H90000023

     CONST PHONEHOOKSWITCHDEV_HANDSET = &H1&
     CONST PHONEHOOKSWITCHDEV_SPEAKER = &H2&
     CONST PHONEHOOKSWITCHDEV_HEADSET = &H4&

     CONST PHONEHOOKSWITCHMODE_ONHOOK = &H1&
     CONST PHONEHOOKSWITCHMODE_MIC = &H2&
     CONST PHONEHOOKSWITCHMODE_SPEAKER = &H4&
     CONST PHONEHOOKSWITCHMODE_MICSPEAKER = &H8&
     CONST PHONEHOOKSWITCHMODE_UNKNOWN = &H10&

     CONST PHONELAMPMODE_DUMMY = &H1&
     CONST PHONELAMPMODE_OFF = &H2&
     CONST PHONELAMPMODE_STEADY = &H4&
     CONST PHONELAMPMODE_WINK = &H8&
     CONST PHONELAMPMODE_FLASH = &H10&
     CONST PHONELAMPMODE_FLUTTER = &H20&
     CONST PHONELAMPMODE_BROKENFLUTTER = &H40&
     CONST PHONELAMPMODE_UNKNOWN = &H80&


     CONST PHONEPRIVILEGE_MONITOR = &H1&
     CONST PHONEPRIVILEGE_OWNER = &H2&

     CONST PHONESTATE_OTHER = &H1&
     CONST PHONESTATE_CONNECTED = &H2&
     CONST PHONESTATE_DISCONNECTED = &H4&
     CONST PHONESTATE_OWNER = &H8&
     CONST PHONESTATE_MONITORS = &H10&
     CONST PHONESTATE_DISPLAY = &H20&
     CONST PHONESTATE_LAMP = &H40&
     CONST PHONESTATE_RINGMODE = &H80&
     CONST PHONESTATE_RINGVOLUME = &H100&
     CONST PHONESTATE_HANDSETHOOKSWITCH = &H200&
     CONST PHONESTATE_HANDSETVOLUME = &H400&
     CONST PHONESTATE_HANDSETGAIN = &H800&
     CONST PHONESTATE_SPEAKERHOOKSWITCH = &H1000&
     CONST PHONESTATE_SPEAKERVOLUME = &H2000&
     CONST PHONESTATE_SPEAKERGAIN = &H4000&
     CONST PHONESTATE_HEADSETHOOKSWITCH = &H8000&
     CONST PHONESTATE_HEADSETVOLUME = &H10000
     CONST PHONESTATE_HEADSETGAIN = &H20000
     CONST PHONESTATE_SUSPEND = &H40000
     CONST PHONESTATE_RESUME = &H80000
     CONST PHONESTATE_DEVSPECIFIC = &H100000
     CONST PHONESTATE_REINIT = &H200000
     CONST PHONESTATE_CAPSCHANGE = &H400000
     CONST PHONESTATE_REMOVED = &H800000


     TYPE PHONESTATUS

      dwTotalSize AS LONG
      dwNeededSize AS LONG
      dwUsedSize AS LONG

      dwStatusFlags AS LONG
      dwNumOwners AS LONG
      dwNumMonitors AS LONG
      dwRingMode AS LONG
      dwRingVolume AS LONG

      dwHandsetHookSwitchMode AS LONG
      dwHandsetVolume AS LONG
      dwHandsetGain AS LONG

      dwSpeakerHookSwitchMode AS LONG
      dwSpeakerVolume AS LONG
      dwSpeakerGain AS LONG

      dwHeadsetHookSwitchMode AS LONG
      dwHeadsetVolume AS LONG
      dwHeadsetGain AS LONG

      dwDisplaySize AS LONG
      dwDisplayOffset AS LONG

      dwLampModesSize AS LONG
      dwLampModesOffset AS LONG

      dwOwnerNameSize AS LONG
      dwOwnerNameOffset AS LONG

      dwDevSpecificSize AS LONG
      dwDevSpecificOffset AS LONG

     END TYPE

     CONST PHONESTATUSFLAGS_CONNECTED = &H1
     CONST PHONESTATUSFLAGS_SUSPENDED = &H2

     CONST STRINGFORMAT_ASCII = &H1
     CONST STRINGFORMAT_DBCS = &H2
     CONST STRINGFORMAT_UNICODE = &H3
     CONST STRINGFORMAT_BINARY = &H4

     TYPE VARSTRING

      dwTotalSize AS LONG
      dwNeededSize AS LONG
      dwUsedSize AS LONG

      dwStringFormat AS LONG
      dwStringSize AS LONG
      dwStringOffset AS LONG

     END TYPE

' Data types and values for Lines


     CONST LINEADDRCAPFLAGS_FWDNUMRINGS = &H1
     CONST LINEADDRCAPFLAGS_PICKUPGROUPID = &H2
     CONST LINEADDRCAPFLAGS_SECURE = &H4
     CONST LINEADDRCAPFLAGS_BLOCKIDDEFAULT = &H8
     CONST LINEADDRCAPFLAGS_BLOCKIDOVERRIDE = &H10
     CONST LINEADDRCAPFLAGS_DIALED = &H20
     CONST LINEADDRCAPFLAGS_ORIGOFFHOOK = &H40
     CONST LINEADDRCAPFLAGS_DESTOFFHOOK = &H80
     CONST LINEADDRCAPFLAGS_FWDCONSULT = &H100
     CONST LINEADDRCAPFLAGS_SETUPCONFNULL = &H200
     CONST LINEADDRCAPFLAGS_AUTORECONNECT = &H400
     CONST LINEADDRCAPFLAGS_COMPLETIONID = &H800
     CONST LINEADDRCAPFLAGS_TRANSFERHELD = &H1000
     CONST LINEADDRCAPFLAGS_TRANSFERMAKE = &H2000
     CONST LINEADDRCAPFLAGS_CONFERENCEHELD = &H4000
     CONST LINEADDRCAPFLAGS_CONFERENCEMAKE = &H8000
     CONST LINEADDRCAPFLAGS_PARTIALDIAL = &H10000
     CONST LINEADDRCAPFLAGS_FWDSTATUSVALID = &H20000
     CONST LINEADDRCAPFLAGS_FWDINTEXTADDR = &H40000
     CONST LINEADDRCAPFLAGS_FWDBUSYNAADDR = &H80000
     CONST LINEADDRCAPFLAGS_ACCEPTTOALERT = &H100000
     CONST LINEADDRCAPFLAGS_CONFDROP = &H200000
     CONST LINEADDRCAPFLAGS_PICKUPCALLWAIT = &H400000

     TYPE LINEADDRESSCAPS

      dwTotalSize AS LONG
      dwNeededSize AS LONG
      dwUsedSize AS LONG

      dwLineDeviceID AS LONG

      dwAddressSize AS LONG
      dwAddressOffset AS LONG

      dwDevSpecificSize AS LONG
      dwDevSpecificOffset AS LONG

      dwAddressSharing AS LONG
      dwAddressStates AS LONG
      dwCallInfoStates AS LONG
      dwCallerIDFlags AS LONG
      dwCalledIDFlags AS LONG
      dwConnectedIDFlags AS LONG
      dwRedirectionIDFlags AS LONG
      dwRedirectingIDFlags AS LONG
      dwCallStates AS LONG
      dwDialToneModes AS LONG
      dwBusyModes AS LONG
      dwSpecialInfo AS LONG
      dwDisconnectModes AS LONG

      dwMaxNumActiveCalls AS LONG
      dwMaxNumOnHoldCalls AS LONG
      dwMaxNumOnHoldPendingCalls AS LONG
      dwMaxNumConference AS LONG
      dwMaxNumTransConf AS LONG

      dwAddrCapFlags AS LONG
      dwCallFeatures AS LONG
      dwRemoveFromConfCaps AS LONG
      dwRemoveFromConfState AS LONG
      dwTransferModes AS LONG
      dwParkModes AS LONG

      dwForwardModes AS LONG
      dwMaxForwardEntries AS LONG
      dwMaxSpecificEntries AS LONG
      dwMinFwdNumRings AS LONG
      dwMaxFwdNumRings AS LONG

      dwMaxCallCompletions AS LONG
      dwCallCompletionConds AS LONG
      dwCallCompletionModes AS LONG
      dwNumCompletionMessages AS LONG
      dwCompletionMsgTextEntrySize AS LONG
      dwCompletionMsgTextSize AS LONG
      dwCompletionMsgTextOffset AS LONG
      dwAddressFeatures AS LONG

     END TYPE

     CONST LINEADDRESSMODE_ADDRESSID = &H1
     CONST LINEADDRESSMODE_DIALABLEADDR = &H2


     CONST LINEADDRESSSHARING_PRIVATE = &H1
     CONST LINEADDRESSSHARING_BRIDGEDEXCL = &H2
     CONST LINEADDRESSSHARING_BRIDGEDNEW = &H4
     CONST LINEADDRESSSHARING_BRIDGEDSHARED = &H8
     CONST LINEADDRESSSHARING_MONITORED = &H10

     CONST LINEADDRESSSTATE_OTHER = &H1
     CONST LINEADDRESSSTATE_DEVSPECIFIC = &H2
     CONST LINEADDRESSSTATE_INUSEZERO = &H4
     CONST LINEADDRESSSTATE_INUSEONE = &H8
     CONST LINEADDRESSSTATE_INUSEMANY = &H10
     CONST LINEADDRESSSTATE_NUMCALLS = &H20
     CONST LINEADDRESSSTATE_FORWARD = &H40
     CONST LINEADDRESSSTATE_TERMINALS = &H80
     CONST LINEADDRESSSTATE_CAPSCHANGE = &H100

     TYPE LINEADDRESSSTATUS

      dwTotalSize AS LONG
      dwNeededSize AS LONG
      dwUsedSize AS LONG

      dwNumInUse AS LONG
      dwNumActiveCalls AS LONG
      dwNumOnHoldCalls AS LONG
      dwNumOnHoldPendCalls AS LONG
      dwAddressFeatures AS LONG

      dwNumRingsNoAnswer AS LONG
      dwForwardNumEntries AS LONG
      dwForwardSize AS LONG
      dwForwardOffset AS LONG

      dwTerminalModesSize AS LONG
      dwTerminalModesOffset AS LONG

      dwDevSpecificSize AS LONG
      dwDevSpecificOffset AS LONG

     END TYPE

     CONST LINEADDRFEATURE_FORWARD = &H1
     CONST LINEADDRFEATURE_MAKECALL = &H2
     CONST LINEADDRFEATURE_PICKUP = &H4
     CONST LINEADDRFEATURE_SETMEDIACONTROL = &H8
     CONST LINEADDRFEATURE_SETTERMINAL = &H10
     CONST LINEADDRFEATURE_SETUPCONF = &H20
     CONST LINEADDRFEATURE_UNCOMPLETECALL = &H40
     CONST LINEADDRFEATURE_UNPARK = &H80


     CONST LINEANSWERMODE_NONE = &H1
     CONST LINEANSWERMODE_DROP = &H2
     CONST LINEANSWERMODE_HOLD = &H4

     CONST LINEBEARERMODE_VOICE = &H1
     CONST LINEBEARERMODE_SPEECH = &H2
     CONST LINEBEARERMODE_MULTIUSE = &H4
     CONST LINEBEARERMODE_DATA = &H8
     CONST LINEBEARERMODE_ALTSPEECHDATA = &H10
     CONST LINEBEARERMODE_NONCALLSIGNALING = &H20
     CONST LINEBEARERMODE_PASSTHROUGH = &H40

     CONST LINEBUSYMODE_STATION = &H1
     CONST LINEBUSYMODE_TRUNK = &H2
     CONST LINEBUSYMODE_UNKNOWN = &H4
     CONST LINEBUSYMODE_UNAVAIL = &H8

     CONST LINECALLCOMPLCOND_BUSY = &H1
     CONST LINECALLCOMPLCOND_NOANSWER = &H2

     CONST LINECALLCOMPLMODE_CAMPON = &H1
     CONST LINECALLCOMPLMODE_CALLBACK = &H2
     CONST LINECALLCOMPLMODE_INTRUDE = &H4
     CONST LINECALLCOMPLMODE_MESSAGE = &H8

     CONST LINECALLFEATURE_ACCEPT = &H1
     CONST LINECALLFEATURE_ADDTOCONF = &H2
     CONST LINECALLFEATURE_ANSWER = &H4
     CONST LINECALLFEATURE_BLINDTRANSFER = &H8
     CONST LINECALLFEATURE_COMPLETECALL = &H10
     CONST LINECALLFEATURE_COMPLETETRANSF = &H20
     CONST LINECALLFEATURE_DIAL = &H40
     CONST LINECALLFEATURE_DROP = &H80
     CONST LINECALLFEATURE_GATHERDIGITS = &H100
     CONST LINECALLFEATURE_GENERATEDIGITS = &H200
     CONST LINECALLFEATURE_GENERATETONE = &H400
     CONST LINECALLFEATURE_HOLD = &H800
     CONST LINECALLFEATURE_MONITORDIGITS = &H1000
     CONST LINECALLFEATURE_MONITORMEDIA = &H2000
     CONST LINECALLFEATURE_MONITORTONES = &H4000
     CONST LINECALLFEATURE_PARK = &H8000
     CONST LINECALLFEATURE_PREPAREADDCONF = &H10000
     CONST LINECALLFEATURE_REDIRECT = &H20000
     CONST LINECALLFEATURE_REMOVEFROMCONF = &H40000
     CONST LINECALLFEATURE_SECURECALL = &H80000
     CONST LINECALLFEATURE_SENDUSERUSER = &H100000
     CONST LINECALLFEATURE_SETCALLPARAMS = &H200000
     CONST LINECALLFEATURE_SETMEDIACONTROL = &H400000
     CONST LINECALLFEATURE_SETTERMINAL = &H800000
     CONST LINECALLFEATURE_SETUPCONF = &H1000000
     CONST LINECALLFEATURE_SETUPTRANSFER = &H2000000
     CONST LINECALLFEATURE_SWAPHOLD = &H4000000
     CONST LINECALLFEATURE_UNHOLD = &H8000000
     CONST LINECALLFEATURE_RELEASEUSERUSERINFO = &H10000000

     TYPE LINEDIALPARAMS

      dwDialPause AS LONG
      dwDialSpeed AS LONG
      dwDigitDuration AS LONG
      dwWaitForDialtone AS LONG

     END TYPE

     TYPE LINECALLINFO

      dwTotalSize AS LONG
      dwNeededSize AS LONG
      dwUsedSize AS LONG

      hLine AS INTEGER
      dwLineDeviceID AS LONG
      dwAddressID AS LONG

      dwBearerMode AS LONG
      dwRate AS LONG
      dwMediaMode AS LONG

      dwAppSpecific AS LONG
      dwCallID AS LONG
      dwRelatedCallID AS LONG
      dwCallParamFlags AS LONG
      dwCallStates AS LONG

      dwMonitorDigitModes AS LONG
      dwMonitorMediaModes AS LONG
      DialParams AS LINEDIALPARAMS

      dwOrigin AS LONG
      dwReason AS LONG
      dwCompletionID AS LONG
      dwNumOwners AS LONG
      dwNumMonitors AS LONG

      dwCountryCode AS LONG
      dwTrunk AS LONG

      dwCallerIDFlags AS LONG
      dwCallerIDSize AS LONG
      dwCallerIDOffset AS LONG
      dwCallerIDNameSize AS LONG
      dwCallerIDNameOffset AS LONG

      dwCalledIDFlags AS LONG
      dwCalledIDSize AS LONG
      dwCalledIDOffset AS LONG
      dwCalledIDNameSize AS LONG
      dwCalledIDNameOffset AS LONG

      dwConnectedIDFlags AS LONG
      dwConnectedIDSize AS LONG
      dwConnectedIDOffset AS LONG
      dwConnectedIDNameSize AS LONG
      dwConnectedIDNameOffset AS LONG

      dwRedirectionIDFlags AS LONG
      dwRedirectionIDSize AS LONG
      dwRedirectionIDOffset AS LONG
      dwRedirectionIDNameSize AS LONG
      dwRedirectionIDNameOffset AS LONG

      dwRedirectingIDFlags AS LONG
      dwRedirectingIDSize AS LONG
      dwRedirectingIDOffset AS LONG
      dwRedirectingIDNameSize AS LONG
      dwRedirectingIDNameOffset AS LONG

      dwAppNameSize AS LONG
      dwAppNameOffset AS LONG

      dwDisplayableAddressSize AS LONG
      dwDisplayableAddressOffset AS LONG

      dwCalledPartySize AS LONG
      dwCalledPartyOffset AS LONG

      dwCommentSize AS LONG
      dwCommentOffset AS LONG

      dwDisplaySize AS LONG
      dwDisplayOffset AS LONG

      dwUserUserInfoSize AS LONG
      dwUserUserInfoOffset AS LONG

      dwHighLevelCompSize AS LONG
      dwHighLevelCompOffset AS LONG

      dwLowLevelCompSize AS LONG
      dwLowLevelCompOffset AS LONG

      dwChargingInfoSize AS LONG
      dwChargingInfoOffset AS LONG

      dwTerminalModesSize AS LONG
      dwTerminalModesOffset AS LONG

      dwDevSpecificSize AS LONG
      dwDevSpecificOffset AS LONG

     END TYPE

     CONST LINECALLINFOSTATE_OTHER = &H1
     CONST LINECALLINFOSTATE_DEVSPECIFIC = &H2
     CONST LINECALLINFOSTATE_BEARERMODE = &H4
     CONST LINECALLINFOSTATE_RATE = &H8
     CONST LINECALLINFOSTATE_MEDIAMODE = &H10
     CONST LINECALLINFOSTATE_APPSPECIFIC = &H20
     CONST LINECALLINFOSTATE_CALLID = &H40
     CONST LINECALLINFOSTATE_RELATEDCALLID = &H80
     CONST LINECALLINFOSTATE_ORIGIN = &H100
     CONST LINECALLINFOSTATE_REASON = &H200
     CONST LINECALLINFOSTATE_COMPLETIONID = &H400
     CONST LINECALLINFOSTATE_NUMOWNERINCR = &H800
     CONST LINECALLINFOSTATE_NUMOWNERDECR = &H1000
     CONST LINECALLINFOSTATE_NUMMONITORS = &H2000
     CONST LINECALLINFOSTATE_TRUNK = &H4000
     CONST LINECALLINFOSTATE_CALLERID = &H8000
     CONST LINECALLINFOSTATE_CALLEDID = &H10000
     CONST LINECALLINFOSTATE_CONNECTEDID = &H20000
     CONST LINECALLINFOSTATE_REDIRECTIONID = &H40000
     CONST LINECALLINFOSTATE_REDIRECTINGID = &H80000
     CONST LINECALLINFOSTATE_DISPLAY = &H100000
     CONST LINECALLINFOSTATE_USERUSERINFO = &H200000
     CONST LINECALLINFOSTATE_HIGHLEVELCOMP = &H400000
     CONST LINECALLINFOSTATE_LOWLEVELCOMP = &H800000
     CONST LINECALLINFOSTATE_CHARGINGINFO = &H1000000
     CONST LINECALLINFOSTATE_TERMINAL = &H2000000
     CONST LINECALLINFOSTATE_DIALPARAMS = &H4000000
     CONST LINECALLINFOSTATE_MONITORMODES = &H8000000

     TYPE LINECALLLIST

      dwTotalSize AS LONG
      dwNeededSize AS LONG
      dwUsedSize AS LONG

      dwCallsNumEntries AS LONG
      dwCallsSize AS LONG
      dwCallsOffset AS LONG

     END TYPE

     CONST LINECALLORIGIN_OUTBOUND = &H1
     CONST LINECALLORIGIN_INTERNAL = &H2
     CONST LINECALLORIGIN_EXTERNAL = &H4
     CONST LINECALLORIGIN_UNKNOWN = &H10
     CONST LINECALLORIGIN_UNAVAIL = &H20
     CONST LINECALLORIGIN_CONFERENCE = &H40
     CONST LINECALLORIGIN_INBOUND = &H80

     CONST LINECALLPARAMFLAGS_SECURE = &H1
     CONST LINECALLPARAMFLAGS_IDLE = &H2
     CONST LINECALLPARAMFLAGS_BLOCKID = &H4
     CONST LINECALLPARAMFLAGS_ORIGOFFHOOK = &H8
     CONST LINECALLPARAMFLAGS_DESTOFFHOOK = &H10

     TYPE LINECALLPARAMS
     ' Defaults:
      dwTotalSize AS LONG               ' ---------

      dwBearerMode AS LONG              ' voice
      dwMinRate AS LONG                 ' (3.1kHz as integer)
      dwMaxRate AS LONG                 ' (3.1kHz)
      dwMediaMode AS LONG               ' interactiveVoice

      dwCallParamFlags AS LONG          ' 0
      dwAddressMode AS LONG             ' addressID
      dwAddressID AS LONG               ' (any available)

      DialParams AS LINEDIALPARAMS      ' (0, 0, 0, 0)

      dwOrigAddressSize AS LONG         ' 0
      dwOrigAddressOffset AS LONG
      dwDisplayableAddressSize AS LONG
      dwDisplayableAddressOffset AS LONG

      dwCalledPartySize AS LONG         ' 0
      dwCalledPartyOffset AS LONG

      dwCommentSize AS LONG             ' 0
      dwCommentOffset AS LONG

      dwUserUserInfoSize AS LONG        ' 0
      dwUserUserInfoOffset AS LONG

      dwHighLevelCompSize AS LONG       ' 0
      dwHighLevelCompOffset AS LONG

      dwLowLevelCompSize AS LONG        ' 0
      dwLowLevelCompOffset AS LONG

      dwDevSpecificSize AS LONG         ' 0
      dwDevSpecificOffset AS LONG

     END TYPE


     CONST LINECALLPARTYID_BLOCKED = &H1
     CONST LINECALLPARTYID_OUTOFAREA = &H2
     CONST LINECALLPARTYID_NAME = &H4
     CONST LINECALLPARTYID_ADDRESS = &H8
     CONST LINECALLPARTYID_PARTIAL = &H10
     CONST LINECALLPARTYID_UNKNOWN = &H20
     CONST LINECALLPARTYID_UNAVAIL = &H40

     CONST LINECALLPRIVILEGE_NONE = &H1
     CONST LINECALLPRIVILEGE_MONITOR = &H2
     CONST LINECALLPRIVILEGE_OWNER = &H4

     CONST LINECALLREASON_DIRECT = &H1
     CONST LINECALLREASON_FWDBUSY = &H2
     CONST LINECALLREASON_FWDNOANSWER = &H4
     CONST LINECALLREASON_FWDUNCOND = &H8
     CONST LINECALLREASON_PICKUP = &H10
     CONST LINECALLREASON_UNPARK = &H20
     CONST LINECALLREASON_REDIRECT = &H40
     CONST LINECALLREASON_CALLCOMPLETION = &H80
     CONST LINECALLREASON_TRANSFER = &H100
     CONST LINECALLREASON_REMINDER = &H200
     CONST LINECALLREASON_UNKNOWN = &H400
     CONST LINECALLREASON_UNAVAIL = &H800
     CONST LINECALLREASON_INTRUDE = &H1000
     CONST LINECALLREASON_PARKED = &H2000

     CONST LINECALLSELECT_LINE = &H1
     CONST LINECALLSELECT_ADDRESS = &H2
     CONST LINECALLSELECT_CALL = &H4

     CONST LINECALLSTATE_IDLE = &H1
     CONST LINECALLSTATE_OFFERING = &H2
     CONST LINECALLSTATE_ACCEPTED = &H4
     CONST LINECALLSTATE_DIALTONE = &H8
     CONST LINECALLSTATE_DIALING = &H10
     CONST LINECALLSTATE_RINGBACK = &H20
     CONST LINECALLSTATE_BUSY = &H40
     CONST LINECALLSTATE_SPECIALINFO = &H80
     CONST LINECALLSTATE_CONNECTED = &H100
     CONST LINECALLSTATE_PROCEEDING = &H200
     CONST LINECALLSTATE_ONHOLD = &H400
     CONST LINECALLSTATE_CONFERENCED = &H800
     CONST LINECALLSTATE_ONHOLDPENDCONF = &H1000
     CONST LINECALLSTATE_ONHOLDPENDTRANSFER = &H2000
     CONST LINECALLSTATE_DISCONNECTED = &H4000
     CONST LINECALLSTATE_UNKNOWN = &H8000


     CONST LINECONNECTEDMODE_ACTIVE = &H1
     CONST LINECONNECTEDMODE_INACTIVE = &H2

     CONST LINEOFFERINGMODE_ACTIVE = &H1
     CONST LINEOFFERINGMODE_INACTIVE = &H2


     TYPE LINECALLSTATUS

      dwTotalSize AS LONG
      dwNeededSize AS LONG
      dwUsedSize AS LONG

      dwCallState AS LONG
      dwCallStateMode AS LONG
      dwCallPrivilege AS LONG
      dwCallFeatures AS LONG

      dwDevSpecificSize AS LONG
      dwDevSpecificOffset AS LONG

     END TYPE

     CONST LINEDEVCAPFLAGS_CROSSADDRCONF = &H1
     CONST LINEDEVCAPFLAGS_HIGHLEVCOMP = &H2
     CONST LINEDEVCAPFLAGS_LOWLEVCOMP = &H4
     CONST LINEDEVCAPFLAGS_MEDIACONTROL = &H8
     CONST LINEDEVCAPFLAGS_MULTIPLEADDR = &H10
     CONST LINEDEVCAPFLAGS_CLOSEDROP = &H20
     CONST LINEDEVCAPFLAGS_DIALBILLING = &H40
     CONST LINEDEVCAPFLAGS_DIALQUIET = &H80
     CONST LINEDEVCAPFLAGS_DIALDIALTONE = &H100

     TYPE LINEEXTENSIONID

      dwExtensionID0 AS LONG
      dwExtensionID1 AS LONG
      dwExtensionID2 AS LONG
      dwExtensionID3 AS LONG

     END TYPE


     TYPE LINEDEVCAPS

      dwTotalSize AS LONG
      dwNeededSize AS LONG
      dwUsedSize AS LONG

      dwProviderInfoSize AS LONG
      dwProviderInfoOffset AS LONG

      dwSwitchInfoSize AS LONG
      dwSwitchInfoOffset AS LONG

      dwPermanentLineID AS LONG
      dwLineNameSize AS LONG
      dwLineNameOffset AS LONG
      dwStringFormat AS LONG

      dwAddressModes AS LONG
      dwNumAddresses AS LONG
      dwBearerModes AS LONG
      dwMaxRate AS LONG
      dwMediaModes AS LONG

      dwGenerateToneModes AS LONG
      dwGenerateToneMaxNumFreq AS LONG
      dwGenerateDigitModes AS LONG
      dwMonitorToneMaxNumFreq AS LONG
      dwMonitorToneMaxNumEntries AS LONG
      dwMonitorDigitModes AS LONG
      dwGatherDigitsMinTimeout AS LONG
      dwGatherDigitsMaxTimeout AS LONG

      dwMedCtlDigitMaxListSize AS LONG
      dwMedCtlMediaMaxListSize AS LONG
      dwMedCtlToneMaxListSize AS LONG
      dwMedCtlCallStateMaxListSize AS LONG

      dwDevCapFlags AS LONG
      dwMaxNumActiveCalls AS LONG
      dwAnswerMode AS LONG
      dwRingModes AS LONG
      dwLineStates AS LONG

      dwUUIAcceptSize AS LONG
      dwUUIAnswerSize AS LONG
      dwUUIMakeCallSize AS LONG
      dwUUIDropSize AS LONG
      dwUUISendUserUserInfoSize AS LONG
      dwUUICallInfoSize AS LONG

      MinDialParams AS LINEDIALPARAMS
      MaxDialParams AS LINEDIALPARAMS
      DefaultDialParams AS LINEDIALPARAMS

      dwNumTerminals AS LONG
      dwTerminalCapsSize AS LONG
      dwTerminalCapsOffset AS LONG
      dwTerminalTextEntrySize AS LONG
      dwTerminalTextSize AS LONG
      dwTerminalTextOffset AS LONG

      dwDevSpecificSize AS LONG
      dwDevSpecificOffset AS LONG
      dwLineFeatures AS LONG

     END TYPE

     CONST LINEDEVSTATE_OTHER = &H1
     CONST LINEDEVSTATE_RINGING = &H2
     CONST LINEDEVSTATE_CONNECTED = &H4
     CONST LINEDEVSTATE_DISCONNECTED = &H8
     CONST LINEDEVSTATE_MSGWAITON = &H10
     CONST LINEDEVSTATE_MSGWAITOFF = &H20
     CONST LINEDEVSTATE_INSERVICE = &H40
     CONST LINEDEVSTATE_OUTOFSERVICE = &H80
     CONST LINEDEVSTATE_MAINTENANCE = &H100
     CONST LINEDEVSTATE_OPEN = &H200
     CONST LINEDEVSTATE_CLOSE = &H400
     CONST LINEDEVSTATE_NUMCALLS = &H800
     CONST LINEDEVSTATE_NUMCOMPLETIONS = &H1000
     CONST LINEDEVSTATE_TERMINALS = &H2000
     CONST LINEDEVSTATE_ROAMMODE = &H4000
     CONST LINEDEVSTATE_BATTERY = &H8000
     CONST LINEDEVSTATE_SIGNAL = &H10000
     CONST LINEDEVSTATE_DEVSPECIFIC = &H20000
     CONST LINEDEVSTATE_REINIT = &H40000
     CONST LINEDEVSTATE_LOCK = &H80000
     CONST LINEDEVSTATE_CAPSCHANGE = &H100000
     CONST LINEDEVSTATE_CONFIGCHANGE = &H200000
     CONST LINEDEVSTATE_TRANSLATECHANGE = &H400000
     CONST LINEDEVSTATE_COMPLCANCEL = &H800000
     CONST LINEDEVSTATE_REMOVED = &H1000000


     TYPE LINEDEVSTATUS

      dwTotalSize AS LONG
      dwNeededSize AS LONG
      dwUsedSize AS LONG

      dwNumOpens AS LONG
      dwOpenMediaModes AS LONG
      dwNumActiveCalls AS LONG
      dwNumOnHoldCalls AS LONG
      dwNumOnHoldPendCalls AS LONG
      dwLineFeatures AS LONG
      dwNumCallCompletions AS LONG
      dwRingMode AS LONG
      dwSignalLevel AS LONG
      dwBatteryLevel AS LONG
      dwRoamMode AS LONG

      dwDevStatusFlags AS LONG

      dwTerminalModesSize AS LONG
      dwTerminalModesOffset AS LONG

      dwDevSpecificSize AS LONG
      dwDevSpecificOffset AS LONG

     END TYPE

     CONST LINEDEVSTATUSFLAGS_CONNECTED = &H1
     CONST LINEDEVSTATUSFLAGS_MSGWAIT = &H2
     CONST LINEDEVSTATUSFLAGS_INSERVICE = &H4
     CONST LINEDEVSTATUSFLAGS_LOCKED = &H8


     CONST LINEDIALTONEMODE_NORMAL = &H1
     CONST LINEDIALTONEMODE_SPECIAL = &H2
     CONST LINEDIALTONEMODE_INTERNAL = &H4
     CONST LINEDIALTONEMODE_EXTERNAL = &H8
     CONST LINEDIALTONEMODE_UNKNOWN = &H10
     CONST LINEDIALTONEMODE_UNAVAIL = &H20

     CONST LINEDIGITMODE_PULSE = &H1
     CONST LINEDIGITMODE_DTMF = &H2
     CONST LINEDIGITMODE_DTMFEND = &H4

     CONST LINEDISCONNECTMODE_NORMAL = &H1
     CONST LINEDISCONNECTMODE_UNKNOWN = &H2
     CONST LINEDISCONNECTMODE_REJECT = &H4
     CONST LINEDISCONNECTMODE_PICKUP = &H8
     CONST LINEDISCONNECTMODE_FORWARDED = &H10
     CONST LINEDISCONNECTMODE_BUSY = &H20
     CONST LINEDISCONNECTMODE_NOANSWER = &H40
     CONST LINEDISCONNECTMODE_BADADDRESS = &H80
     CONST LINEDISCONNECTMODE_UNREACHABLE = &H100
     CONST LINEDISCONNECTMODE_CONGESTION = &H200
     CONST LINEDISCONNECTMODE_INCOMPATIBLE = &H400
     CONST LINEDISCONNECTMODE_UNAVAIL = &H800
     CONST LINEDISCONNECTMODE_NODIALTONE = &H1000

     CONST LINEERR_ALLOCATED = &H80000001
     CONST LINEERR_BADDEVICEID = &H80000002
     CONST LINEERR_BEARERMODEUNAVAIL = &H80000003
     CONST LINEERR_CALLUNAVAIL = &H80000005
     CONST LINEERR_COMPLETIONOVERRUN = &H80000006
     CONST LINEERR_CONFERENCEFULL = &H80000007
     CONST LINEERR_DIALBILLING = &H80000008
     CONST LINEERR_DIALDIALTONE = &H80000009
     CONST LINEERR_DIALPROMPT = &H8000000A
     CONST LINEERR_DIALQUIET = &H8000000B
     CONST LINEERR_INCOMPATIBLEAPIVERSION = &H8000000C
     CONST LINEERR_INCOMPATIBLEEXTVERSION = &H8000000D
     CONST LINEERR_INIFILECORRUPT = &H8000000E
     CONST LINEERR_INUSE = &H8000000F
     CONST LINEERR_INVALADDRESS = &H80000010
     CONST LINEERR_INVALADDRESSID = &H80000011
     CONST LINEERR_INVALADDRESSMODE = &H80000012
     CONST LINEERR_INVALADDRESSSTATE = &H80000013
     CONST LINEERR_INVALAPPHANDLE = &H80000014
     CONST LINEERR_INVALAPPNAME = &H80000015
     CONST LINEERR_INVALBEARERMODE = &H80000016
     CONST LINEERR_INVALCALLCOMPLMODE = &H80000017
     CONST LINEERR_INVALCALLHANDLE = &H80000018
     CONST LINEERR_INVALCALLPARAMS = &H80000019
     CONST LINEERR_INVALCALLPRIVILEGE = &H8000001A
     CONST LINEERR_INVALCALLSELECT = &H8000001B
     CONST LINEERR_INVALCALLSTATE = &H8000001C
     CONST LINEERR_INVALCALLSTATELIST = &H8000001D
     CONST LINEERR_INVALCARD = &H8000001E
     CONST LINEERR_INVALCOMPLETIONID = &H8000001F
     CONST LINEERR_INVALCONFCALLHANDLE = &H80000020
     CONST LINEERR_INVALCONSULTCALLHANDLE = &H80000021
     CONST LINEERR_INVALCOUNTRYCODE = &H80000022
     CONST LINEERR_INVALDEVICECLASS = &H80000023
     CONST LINEERR_INVALDEVICEHANDLE = &H80000024
     CONST LINEERR_INVALDIALPARAMS = &H80000025
     CONST LINEERR_INVALDIGITLIST = &H80000026
     CONST LINEERR_INVALDIGITMODE = &H80000027
     CONST LINEERR_INVALDIGITS = &H80000028
     CONST LINEERR_INVALEXTVERSION = &H80000029
     CONST LINEERR_INVALGROUPID = &H8000002A
     CONST LINEERR_INVALLINEHANDLE = &H8000002B
     CONST LINEERR_INVALLINESTATE = &H8000002C
     CONST LINEERR_INVALLOCATION = &H8000002D
     CONST LINEERR_INVALMEDIALIST = &H8000002E
     CONST LINEERR_INVALMEDIAMODE = &H8000002F
     CONST LINEERR_INVALMESSAGEID = &H80000030
     CONST LINEERR_INVALPARAM = &H80000032
     CONST LINEERR_INVALPARKID = &H80000033
     CONST LINEERR_INVALPARKMODE = &H80000034
     CONST LINEERR_INVALPOINTER = &H80000035
     CONST LINEERR_INVALPRIVSELECT = &H80000036
     CONST LINEERR_INVALRATE = &H80000037
     CONST LINEERR_INVALREQUESTMODE = &H80000038
     CONST LINEERR_INVALTERMINALID = &H80000039
     CONST LINEERR_INVALTERMINALMODE = &H8000003A
     CONST LINEERR_INVALTIMEOUT = &H8000003B
     CONST LINEERR_INVALTONE = &H8000003C
     CONST LINEERR_INVALTONELIST = &H8000003D
     CONST LINEERR_INVALTONEMODE = &H8000003E
     CONST LINEERR_INVALTRANSFERMODE = &H8000003F
     CONST LINEERR_LINEMAPPERFAILED = &H80000040
     CONST LINEERR_NOCONFERENCE = &H80000041
     CONST LINEERR_NODEVICE = &H80000042
     CONST LINEERR_NODRIVER = &H80000043
     CONST LINEERR_NOMEM = &H80000044
     CONST LINEERR_NOREQUEST = &H80000045
     CONST LINEERR_NOTOWNER = &H80000046
     CONST LINEERR_NOTREGISTERED = &H80000047
     CONST LINEERR_OPERATIONFAILED = &H80000048
     CONST LINEERR_OPERATIONUNAVAIL = &H80000049
     CONST LINEERR_RATEUNAVAIL = &H8000004A
     CONST LINEERR_RESOURCEUNAVAIL = &H8000004B
     CONST LINEERR_REQUESTOVERRUN = &H8000004C
     CONST LINEERR_STRUCTURETOOSMALL = &H8000004D
     CONST LINEERR_TARGETNOTFOUND = &H8000004E
     CONST LINEERR_TARGETSELF = &H8000004F
     CONST LINEERR_UNINITIALIZED = &H80000050
     CONST LINEERR_USERUSERINFOTOOBIG = &H80000051
     CONST LINEERR_REINIT = &H80000052
     CONST LINEERR_ADDRESSBLOCKED = &H80000053
     CONST LINEERR_BILLINGREJECTED = &H80000054
     CONST LINEERR_INVALFEATURE = &H80000055
     CONST LINEERR_NOMULTIPLEINSTANCE = &H80000056


     CONST LINEFEATURE_DEVSPECIFIC = &H1
     CONST LINEFEATURE_DEVSPECIFICFEAT = &H2
     CONST LINEFEATURE_FORWARD = &H4
     CONST LINEFEATURE_MAKECALL = &H8
     CONST LINEFEATURE_SETMEDIACONTROL = &H10
     CONST LINEFEATURE_SETTERMINAL = &H20

     TYPE lineForward

      dwForwardMode AS LONG

      dwCallerAddressSize AS LONG
      dwCallerAddressOffset AS LONG

      dwDestCountryCode AS LONG
      dwDestAddressSize AS LONG
      dwDestAddressOffset AS LONG

     END TYPE

     TYPE LINEFORWARDLIST
      dwTotalSize AS LONG
      dwNumEntries AS LONG
      ForwardList(1) AS lineForward
     END TYPE

     CONST LINEFORWARDMODE_UNCOND = &H1
     CONST LINEFORWARDMODE_UNCONDINTERNAL = &H2
     CONST LINEFORWARDMODE_UNCONDEXTERNAL = &H4
     CONST LINEFORWARDMODE_UNCONDSPECIFIC = &H8
     CONST LINEFORWARDMODE_BUSY = &H10
     CONST LINEFORWARDMODE_BUSYINTERNAL = &H20
     CONST LINEFORWARDMODE_BUSYEXTERNAL = &H40
     CONST LINEFORWARDMODE_BUSYSPECIFIC = &H80
     CONST LINEFORWARDMODE_NOANSW = &H100
     CONST LINEFORWARDMODE_NOANSWINTERNAL = &H200
     CONST LINEFORWARDMODE_NOANSWEXTERNAL = &H400
     CONST LINEFORWARDMODE_NOANSWSPECIFIC = &H800
     CONST LINEFORWARDMODE_BUSYNA = &H1000
     CONST LINEFORWARDMODE_BUSYNAINTERNAL = &H2000
     CONST LINEFORWARDMODE_BUSYNAEXTERNAL = &H4000
     CONST LINEFORWARDMODE_BUSYNASPECIFIC = &H8000
     CONST LINEFORWARDMODE_UNKNOWN = &H10000
     CONST LINEFORWARDMODE_UNAVAIL = &H20000

     CONST LINEGATHERTERM_BUFFERFULL = &H1
     CONST LINEGATHERTERM_TERMDIGIT = &H2
     CONST LINEGATHERTERM_FIRSTTIMEOUT = &H4
     CONST LINEGATHERTERM_INTERTIMEOUT = &H8
     CONST LINEGATHERTERM_CANCEL = &H10

     CONST LINEGENERATETERM_DONE = &H1
     CONST LINEGENERATETERM_CANCEL = &H2

     TYPE lineGenerateTone

      dwFrequency AS LONG
      dwCadenceOn AS LONG
      dwCadenceOff AS LONG
      dwVolume AS LONG

     END TYPE

     CONST LINEMAPPER = &HFFFFFFFF
     TYPE LINEMEDIACONTROLCALLSTATE

      dwCallStates AS LONG
      dwMediaControl AS LONG

     END TYPE

     TYPE LINEMEDIACONTROLDIGIT

      dwDigit AS LONG
      dwDigitModes AS LONG
      dwMediaControl AS LONG

     END TYPE

     TYPE LINEMEDIACONTROLMEDIA

      dwMediaModes AS LONG
      dwDuration AS LONG
      dwMediaControl AS LONG

     END TYPE

     TYPE LINEMEDIACONTROLTONE

      dwAppSpecific AS LONG
      dwDuration AS LONG
      dwFrequency1 AS LONG
      dwFrequency2 AS LONG
      dwFrequency3 AS LONG
      dwMediaControl AS LONG

     END TYPE

     CONST LINEMEDIACONTROL_NONE = &H1
     CONST LINEMEDIACONTROL_START = &H2
     CONST LINEMEDIACONTROL_RESET = &H4
     CONST LINEMEDIACONTROL_PAUSE = &H8
     CONST LINEMEDIACONTROL_RESUME = &H10
     CONST LINEMEDIACONTROL_RATEUP = &H20
     CONST LINEMEDIACONTROL_RATEDOWN = &H40
     CONST LINEMEDIACONTROL_RATENORMAL = &H80
     CONST LINEMEDIACONTROL_VOLUMEUP = &H100
     CONST LINEMEDIACONTROL_VOLUMEDOWN = &H200
     CONST LINEMEDIACONTROL_VOLUMENORMAL = &H400

     CONST LINEMEDIAMODE_UNKNOWN = &H2
     CONST LINEMEDIAMODE_INTERACTIVEVOICE = &H4
     CONST LINEMEDIAMODE_AUTOMATEDVOICE = &H8
     CONST LINEMEDIAMODE_DATAMODEM = &H10
     CONST LINEMEDIAMODE_G3FAX = &H20
     CONST LINEMEDIAMODE_TDD = &H40
     CONST LINEMEDIAMODE_G4FAX = &H80
     CONST LINEMEDIAMODE_DIGITALDATA = &H100
     CONST LINEMEDIAMODE_TELETEX = &H200
     CONST LINEMEDIAMODE_VIDEOTEX = &H400
     CONST LINEMEDIAMODE_TELEX = &H800
     CONST LINEMEDIAMODE_MIXED = &H1000
     CONST LINEMEDIAMODE_ADSI = &H2000
     CONST LINEMEDIAMODE_VOICEVIEW = &H4000

     CONST LAST_LINEMEDIAMODE = &H4000


     TYPE LINEMONITORTONE

      dwAppSpecific AS LONG
      dwDuration AS LONG
      dwFrequency1 AS LONG
      dwFrequency2 AS LONG
      dwFrequency3 AS LONG

     END TYPE

     CONST LINEPARKMODE_DIRECTED = &H1
     CONST LINEPARKMODE_NONDIRECTED = &H2

     CONST LINEREMOVEFROMCONF_NONE = &H1
     CONST LINEREMOVEFROMCONF_LAST = &H2
     CONST LINEREMOVEFROMCONF_ANY = &H3

     TYPE LINEREQMAKECALL

      szDestAddress AS STRING * TAPIMAXDESTADDRESSSIZE
      szAppName AS STRING * TAPIMAXAPPNAMESIZE
      szCalledParty AS STRING * TAPIMAXCALLEDPARTYSIZE
      szComment AS STRING * TAPIMAXCOMMENTSIZE

     END TYPE

     TYPE LINEREQMEDIACALL

      hWnd AS INTEGER
      wRequestID AS INTEGER
      szDeviceClass AS STRING * TAPIMAXDEVICECLASSSIZE
'    unsigned char    ucDeviceID[TAPIMAXDEVICEIDSIZE];
      ucDeviceID AS STRING * TAPIMAXDEVICEIDSIZE
      dwSize AS LONG
      dwSecure AS LONG
      szDestAddress AS STRING * TAPIMAXDESTADDRESSSIZE
      szAppName AS STRING * TAPIMAXAPPNAMESIZE
      szCalledParty AS STRING * TAPIMAXCALLEDPARTYSIZE
      szComment AS STRING * TAPIMAXCOMMENTSIZE

     END TYPE

     CONST LINEREQUESTMODE_MAKECALL = &H1
     CONST LINEREQUESTMODE_MEDIACALL = &H2
     CONST LINEREQUESTMODE_DROP = &H4

     CONST LAST_LINEREQUESTMODE = LINEREQUESTMODE_MEDIACALL

     CONST LINEROAMMODE_UNKNOWN = &H1
     CONST LINEROAMMODE_UNAVAIL = &H2
     CONST LINEROAMMODE_HOME = &H4
     CONST LINEROAMMODE_ROAMA = &H8
     CONST LINEROAMMODE_ROAMB = &H10

     CONST LINESPECIALINFO_NOCIRCUIT = &H1
     CONST LINESPECIALINFO_CUSTIRREG = &H2
     CONST LINESPECIALINFO_REORDER = &H4
     CONST LINESPECIALINFO_UNKNOWN = &H8
     CONST LINESPECIALINFO_UNAVAIL = &H10

     TYPE LINETERMCAPS

      dwTermDev AS LONG
      dwTermModes AS LONG
      dwTermSharing AS LONG

     END TYPE

     CONST LINETERMDEV_PHONE = &H1
     CONST LINETERMDEV_HEADSET = &H2
     CONST LINETERMDEV_SPEAKER = &H4

     CONST LINETERMMODE_BUTTONS = &H1
     CONST LINETERMMODE_LAMPS = &H2
     CONST LINETERMMODE_DISPLAY = &H4
     CONST LINETERMMODE_RINGER = &H8
     CONST LINETERMMODE_HOOKSWITCH = &H10
     CONST LINETERMMODE_MEDIATOLINE = &H20
     CONST LINETERMMODE_MEDIAFROMLINE = &H40
     CONST LINETERMMODE_MEDIABIDIRECT = &H80

     CONST LINETERMSHARING_PRIVATE = &H1
     CONST LINETERMSHARING_SHAREDEXCL = &H2
     CONST LINETERMSHARING_SHAREDCONF = &H4

     CONST LINETONEMODE_CUSTOM = &H1
     CONST LINETONEMODE_RINGBACK = &H2
     CONST LINETONEMODE_BUSY = &H4
     CONST LINETONEMODE_BEEP = &H8
     CONST LINETONEMODE_BILLING = &H10

     CONST LINETRANSFERMODE_TRANSFER = &H1
     CONST LINETRANSFERMODE_CONFERENCE = &H2

     TYPE LINETRANSLATEOUTPUT

      dwTotalSize AS LONG
      dwNeededSize AS LONG
      dwUsedSize AS LONG

      dwDialableStringSize AS LONG
      dwDialableStringOffset AS LONG
      dwDisplayableStringSize AS LONG
      dwDisplayableStringOffset AS LONG

      dwCurrentCountry AS LONG
      dwDestCountry AS LONG
      dwTranslateResults AS LONG

     END TYPE

     TYPE LINETRANSLATECAPS

      dwTotalSize AS LONG
      dwNeededSize AS LONG
      dwUsedSize AS LONG

      dwNumLocations AS LONG
      dwLocationListSize AS LONG
      dwLocationListOffset AS LONG

      dwCurrentLocationID AS LONG

      dwNumCards AS LONG
      dwCardListSize AS LONG
      dwCardListOffset AS LONG

      dwCurrentPreferredCardID AS LONG

     END TYPE

     TYPE LINELOCATIONENTRY

      dwPermanentLocationID AS LONG
      dwLocationNameSize AS LONG
      dwLocationNameOffset AS LONG
      dwCountryCode AS LONG
      dwCityCodeSize AS LONG
      dwCityCodeOffset AS LONG
      dwPreferredCardID AS LONG
      dwLocalAccessCodeSize AS LONG
      dwLocalAccessCodeOffset AS LONG
      dwLongDistanceAccessCodeSize AS LONG
      dwLongDistanceAccessCodeOffset AS LONG
      dwTollPrefixListSize AS LONG
      dwTollPrefixListOffset AS LONG
      dwCountryID AS LONG
      dwOptions AS LONG
      dwCancelCallWaitingSize AS LONG
      dwCancelCallWaitingOffset AS LONG

     END TYPE

     TYPE LINECARDENTRY

      dwPermanentCardID AS LONG
      dwCardNameSize AS LONG
      dwCardNameOffset AS LONG
      dwCardNumberDigits AS LONG
      dwSameAreaRuleSize AS LONG
      dwSameAreaRuleOffset AS LONG
      dwLongDistanceRuleSize AS LONG
      dwLongDistanceRuleOffset AS LONG
      dwInternationalRuleSize AS LONG
      dwInternationalRuleOffset AS LONG
      dwOptions AS LONG

     END TYPE

     TYPE LINECOUNTRYLIST

      dwTotalSize AS LONG
      dwNeededSize AS LONG
      dwUsedSize AS LONG

      dwNumCountries AS LONG
      dwCountryListSize AS LONG
      dwCountryListOffset AS LONG

     END TYPE

     TYPE LINECOUNTRYENTRY

      dwCountryID AS LONG
      dwCountryCode AS LONG
      dwNextCountryID AS LONG
      dwCountryNameSize AS LONG
      dwCountryNameOffset AS LONG
      dwSameAreaRuleSize AS LONG
      dwSameAreaRuleOffset AS LONG
      dwLongDistanceRuleSize AS LONG
      dwLongDistanceRuleOffset AS LONG
      dwInternationalRuleSize AS LONG
      dwInternationalRuleOffset AS LONG

     END TYPE

     TYPE LINEPROVIDERLIST

      dwTotalSize AS LONG
      dwNeededSize AS LONG
      dwUsedSize AS LONG
      dwNumProviders AS LONG
      dwProviderListSize AS LONG
      dwProviderListOffset AS LONG

     END TYPE

     TYPE LINEPROVIDERENTRY

      dwPermanentProviderID AS LONG
      dwProviderFilenameSize AS LONG
      dwProviderFilenameOffset AS LONG

     END TYPE


     CONST LINETOLLLISTOPTION_ADD = &H1
     CONST LINETOLLLISTOPTION_REMOVE = &H2

     CONST LINETRANSLATEOPTION_CARDOVERRIDE = &H1
     CONST LINETRANSLATEOPTION_CANCELCALLWAITING = &H2
     CONST LINETRANSLATEOPTION_FORCELOCAL = &H4
     CONST LINETRANSLATEOPTION_FORCELD = &H8

     CONST LINETRANSLATERESULT_CANONICAL = &H1
     CONST LINETRANSLATERESULT_INTERNATIONAL = &H2
     CONST LINETRANSLATERESULT_LONGDISTANCE = &H4
     CONST LINETRANSLATERESULT_LOCAL = &H8
     CONST LINETRANSLATERESULT_INTOLLLIST = &H10
     CONST LINETRANSLATERESULT_NOTINTOLLLIST = &H20
     CONST LINETRANSLATERESULT_DIALBILLING = &H40
     CONST LINETRANSLATERESULT_DIALQUIET = &H80
     CONST LINETRANSLATERESULT_DIALDIALTONE = &H100
     CONST LINETRANSLATERESULT_DIALPROMPT = &H200


     CONST LINELOCATIONOPTION_PULSEDIAL = &H1

     CONST LINECARDOPTION_PREDEFINED = &H1
     CONST LINECARDOPTION_HIDDEN = &H2


' Simple Telephony prototypes

     DECLARE FUNCTION tapiRequestMakeCall LIB "tapi32.dll" ALIAS "tapiRequestMakeCall" (DestAddress AS STRING,AppName AS STRING,CalledParty AS STRING,Comment AS STRING)AS LONG

     DIM executeit AS LONG
     executeit=tapiRequestMakeCall("15619660031","$noname.exe","johngraves","You know you are calling my house don't you?")

'Declare Function lineDial Lib "tapi32.dll" Alias "lineDial"(ByVal hCall As Integer,ByValpszDestAddress As String,dwCountryCode As Long)
'executeit=linedial(1,
掌柜推荐
 
 
¥1,390.00 ·
 
 
¥287.00 ·
 
 
¥410.00 ·
 
 
¥1,380.00 ·
 
 
¥1,080.00 ·
 
 
¥271.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2003-06-14 16:22:08