N.P.
Neil,
what's the intend of your question?
Are you referring to a specific TSP that you have in source control?
Or only from a TAPI app's perspective?
TAPI apps can't change the device order.
The device order is controlled by TAPISRV and determined by:
1) order of TSP installation
2) each TSP on TSPI_providerEnumDevices() / TSPI_providerInit()
3) dynamic device creation / removal: LINE_CREATE / _REMOVE,
TSPI_providerCreateLineDevice()
--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK
TAPI / TSP Developer and Tester
http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
* Please post all messages and replies to the newsgroup so all may
* benefit from the discussion. Private mail is usually not replied to.
* This posting is provided "AS IS" with no warranties, and confers no rights.
N.P
"Andreas Marschall [MVP TAPI]" <Andreas....@I-B-A-M.de> wrote in
message news:%23P%23PbRTk...@TK2MSFTNGP11.phx.gbl...
Neil,
As you can see in ControlPanel there are some TSPs that can't be removed or
configured.
So I guess it will be impossible to remove all device (without hacking the
registry and potentially causing instabilies).
I still don't get it why you need a constant dwDeviceID for a given device.
I don't see any reason not use the usual mechanism like
lineNegotiateAPIVersion() / lineNegotiateExtVersion() / lineGetDevCaps() /
lineGetAddressCaps() to search for the device you want.
N.P.
"Andreas Marschall [MVP TAPI]" <Andreas....@I-B-A-M.de> wrote in
message news:eM1yRIck...@TK2MSFTNGP11.phx.gbl...
Just by the way, TAPI has a kind of vendor and device neutral way of looking
at the world. It is as though TAPI collects all of the resources on a box
and puts them all into one big pile. It is left for the application to
inspect the devices in the pile one by one, and use one or reject one based
on its capabilities.
When I need to determine if a device is a modem I make sure that the
dwMediaModes member in the LINEDEVCAPS structure corresponding to the line
in question has the LINEMEDIAMODE_DATAMODEM bit set. Then if I can get from
lineGetID() the multimedia identifiers of the speaker and microphone in the
line and open the devices I know the line device is good to go.
This is different from other vendor-neutral APIs like ODBC where you can
"connect" to a particular vendor's driver and pass credentials so that, for
example, you only see the database provided by Oracle. It would be nice if
you could do the same thing with TAPI - say connect to the UNIMODEM TSP for
access only to modems or the Cisco TSP for access only to its CTI ports and
CIT route points, but sadly, you can't. You need to write the code to
inspect the devices and open only those that you like.
Regards,
Will
Neil,
RAS doesn't provide TAPI devices. RAS itself is using TAPI and TAPI devices to
dial out.
If you wrongly identified the device you want then your "filter" wasn't
precise enough.
E.g. if you want only modems hosted by UniModem.TSP then include an evaluation
of the TSP of each device.
See my TAPI and TSPI FAQ:
Q: Which TSP is hosting a given line device ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Which_TSP
Once you've found the device you want to use on a given system you can store
its LINEDEVCAPS.dwPermanentLineID within your app configuration and search for
it the next time your app launches.
I am checking for LINEMEDIAMODE_DATAMODEM bit, but not sure what you mean
about the multimedia identifiers of the speaker and microphone. Is this the
same as calling GetLineId and using a specific device class name, such as
"comm/datamodem"?
N.P.
"William DePalo [MVP VC++]" <willd....@mvps.org> wrote in message
news:OUm2bIf...@tk2msftngp13.phx.gbl...
Neil,
I guess Will was talking about DeviceClasses "wave/in" and "wave/out".
Sorry, I forgot that you needed to make a data call. Same principle applies,
if the search for the device of the class in question succeeds and if the
datamodem bit is set you should be good to go.
Regards,
Will