Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TAPI API Calls

Status
Not open for further replies.

EriRobert

MIS
May 9, 2003
114
0
0
GB
Hello everyone

I'm trying to get more information about the TAPI API call lineOpen and specifically the second parameter dwDeviceID.

Code:
Declare Function lineOpen Lib "TAPI32.DLL" _
    (ByVal l_hLineApp As Long, _
        ByVal l_dwDeviceID As Long, _
        l_lphLine As Long, _
        ByVal l_dwAPIVersion As Long, _
        ByVal l_dwExtVersion As Long, _
        ByVal l_dwCallbackInstance As Long, _
        ByVal l_dwPrivileges As Long, _
        ByVal l_dwMediaModes As Long, _
        struct_lpCallParams As Any) As Long

The manuals say regarding the second parameter

Identifies the line device to be opened. It can either be a valid device identifier or the value:

LINEMAPPER
This value is used to open a line device in the system that supports the properties specified in lpCallParams. The application can use lineGetID to determine the identifier of the line device that was opened.

Because I can't understand the purpose of this second parameter I'm just hardcoding 6 (randomly selected). This works on 60% of our computers. On the other computers it either does nothing or seems to make the call from a different computer.

I think I need to understand what these devices are a little better. Can anyone recommend a site or book that covers this area, or provide any help?

Thanks

Robert
 
When you call lineInitialize or lineInitializeEx, one of the parameters that are filled is one that tells you how many devices that are recognized by TAPI on the system. (numDev) When you call lineOpen, devId must be within the range of 0 to (numDev -1), denoting wich device in TAPI's "table" you want to open. To get this table, loop through and call lineGetDevCaps for each devId. Be aware that you must allocate more memory for your LINEDEVCAPS pointer than the actual size of the structure. lineGetDevCaps tacks on several strings at the end of the structure which you might want, and you have to allow room for them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top