|
Passthrough Mode
When a call is active in LINEBEARERMODE_PASSTHROUGH, the service provider
gives direct access to the attached hardware for control by the application. This
mode is for use by applications desiring temporary direct control over
asynchronous modems, accessed through the Win32 Communication functions, for the purpose
of configuring or using special features not otherwise supported by the
service provider, such as facsimile (Class 1, 2, and so on). This bearer mode is
supported by the Universal Modem Driver (UNIMODEM) service provider.
Service providers that support LINEBEARERMODE_PASSTHROUGH indicate it in the dwBearerModes member of the LINEDEVCAPS structure. When LINEBEARERMODE_PASSTHROUGH is indicated, the Unimodem service
provider will also include in the DevSpecific area of the LINEDEVCAPS structure the registry key used to access information about the modem
associated with the line device, in the following format:
struct {
DWORD dwContents; // Set to 1 (indicates containing key)
DWORD dwKeyOffset; // Offset to key from start of this
// structure (not from start of
// LINEDEVCAPS structure). 8 in
// our case.
BYTE rgby[...]; // place containing null-terminated
// registry key.
}
For example:
00000001 00000008 74737953 435c6d65 ........System\C
65727275 6f43746e 6f72746e 7465536c urrentControlSet
7265535c 65636976 6c435c73 5c737361 urrentControlSet
65646f4d 30305c6d xx003030 xxxxxxxx Modem\0000.
This registry key could then be opened using this function:
RegOpenKey(HKEY_LOCAL_MACHINE, pszDevSpecificRegKey, &phkResult)
Passthrough mode is invoked most often using the lineMakeCall function, by setting the LINEBEARERMODE_PASSTHROUGH bit in the dwBearerMode member of the LINECALLPARAMS structure pointed to by the lpCallParams parameter. When this is done, the service provider will open the serial port
to the modem and immediately place the call into LINECALLSTATE_CONNECTED. The
application can then use the lineGetID function with the device class "comm/datamodem" to obtain an open Win32 file
handle to read from and write to the comm port.
Passthrough mode can be invoked in response to an incoming call as well.
Generally, applications will invoke passthrough mode while the call is in
LINECALLSTATE_OFFERING, before the call has been answered. Instead of calling lineAnswer, the applications calls lineSetCallParams, passing LINEBEARERMODE_PASSTHROUGH as the dwBearerMode parameter. When this is done, as with lineMakeCall, the call will immediately be placed into LINECALLSTATE_CONNECTED by the
service provider, and the application can obtain a handle to the open port using lineGetID. lineSetCallParams can be called when the call is in LINECALLSTATE_OFFERING,
LINECALLSTATE_ACCEPTED, or LINECALLSTATE_CONNECTED.
Passthrough mode is normally terminated by calling lineDrop on the call handle obtained from lineMakeCall or the first LINE_CALLSTATE message (if the call was an incoming call). The service provider will close
the port, and restore the modem to its default state. The application must call CloseHandle on the handle it received from lineGetID.
Passthrough mode can also be terminated by calling lineSetCallParams with the dwBearerMode parameter set to LINEBEARERMODE_VOICE. The media mode set by lineSetMediaMode is presumed to be in effect. If LINEMEDIAMODE_DATAMODEM is active, the
service provider will take over the call as though it was a data modem call already
in progress; if lineDrop is subsequently called, the service provider will issue the appropriate modem
commands or interface state changes to drop a data call.
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|