A version of this page is also available for
This message is sent when the state of a line device has changed. The application can invoke lineGetLineDevStatus to determine the new status of the line.
LINE_LINEDEVSTATE dwDevice = (DWORD) hLine; dwCallbackInstance = (DWORD) hCallback; dwParam1 = (DWORD) DeviceState; dwParam2 = (DWORD) DeviceStateDetail1; dwParam3 = (DWORD) DeviceStateDetail2;
Handle to the line device. This parameter is NULL when dwParam1 is LINEDEVSTATE_REINIT.
Callback instance supplied when opening the line. If the dwParam1 parameter is LINEDEVSTATE_REINIT, the dwCallbackInstance parameter is not valid and is set to zero.
Value that specifies the line device status item that has changed. It can be a combination of the following LINEDEVSTATE. The following table shows the values the parameter can take.
Device status items other than those listed below have changed. The application should check the current device status to determine which items have changed.
The switch tells the line to alert the user. Service providers notify applications on each ring cycle by sending messages containing this constant. For example, in the United States, service providers send a message with this constant every six seconds.
The line was previously disconnected and is now connected to TAPI.
This line was previously connected and is now disconnected from TAPI.
The message waiting indicator is turned on.
The message waiting indicator is turned off.
The number of outstanding call completions on the line device has changed.
The line is connected to TAPI. This happens when TAPI is first activated, or when the line wire is physically plugged in and in service at the switch while TAPI is active.
The line is out of service at the switch or physically disconnected. TAPI cannot be used to operate on the line device.
Maintenance is being performed on the line at the switch. TAPI cannot be used to operate on the line device.
The line has been opened by another application.
The line has been closed by another application.
The number of calls on the line device has changed.
The terminal settings have changed.
The roaming state of the line device has changed.
The battery level has changed significantly (cellular).
The signal level has changed significantly (cellular).
The line's device-specific information has changed.
Items have changed in the configuration of line devices. To become aware of these changes (as with the appearance of new line devices), the application should reinitialize its use of TAPI. The dwDevice parameter is left NULL for this state change as it applies to any of the lines in the system.
The locked status of the line device has changed. (For more information, refer to the description of the LINEDEVSTATUSFLAGS_LOCKED bit of the LINEDEVSTATUSFLAGS_ constants.)
Indicates that, due to configuration changes made by the user or other circumstances, one or more of the members in the LINEDEVCAPS structure for the address have changed. The application should use the lineGetDevCaps function to read the updated structure.
Indicates that configuration changes have been made to one or more of the media devices associated with the line device. The application, if it desires, can use the lineGetDevConfig function to read the updated information.
Indicates that, due to configuration changes made by the user or other circumstances, one or more of the members in the LINETRANSLATECAPS structure have changed. The application should use the lineGetTranslateCaps function to read the updated structure.
Indicates that the call completion identified by the completion identifier contained in parameter dwParam2 of the LINE_LINEDEVSTATE message has been externally canceled and is no longer considered valid.
Indicates that the device is being removed from the system by the service provider (most likely through user action, through a control panel or similar utility). Normally, a LINE_LINEDEVSTATE message with this value is immediately followed by a LINE_CLOSE (TAPI) message on the device. Subsequent attempts to access the device prior to TAPI being reinitialized result in LINEERR_NODEVICE being returned to the application. If a service provider sends a LINE_LINEDEVSTATE message containing this value to TAPI, TAPI passes it along to applications that have negotiated TAPI 1.4 or later; applications negotiating a previous API version do not receive any notification.
Specifies the interpretation of this parameter depends on the value of dwParam1. If dwParam1 is LINEDEVSTATE_RINGING, dwParam2 contains the ring mode with which the switch instructs the line to ring. Valid ring modes are numbers in the range one to dwNumRingModes, where dwNumRingModes is a line device capability.
If dwParam1 is LINEDEVSTATE_REINIT, and the message was issued by TAPI as a result of translation of a new TAPI message into a REINIT message, then dwParam2 contains the dwMsg parameter of the original message.
If dwParam2 is zero, this indicates that the REINIT message is a real REINIT message that requires the application to call the lineShutdown function at its earliest convenience.
Value that specifies the interpretation of this parameter depending on the value of dwParam1. If dwParam1 is LINEDEVSTATE_RINGING, dwParam3 contains the ring count for this ring event. The ring count starts at zero.
If dwParam1 is LINEDEVSTATE_REINIT, and the message was issued by TAPI as a result of translation of a new API message into a REINIT message, then dwParam3 contains the dwParam1 parameter of the original message. For example, dwParam3 will contain LINEDEVSTATE_TRANSLATECHANGE or some other LINEDEVSTATE constant, if dwParam2 isLINE_LINEDEVSTATE, or it will create the new device identifier, if dwParam2 is LINE_CREATE).
The sending of the LINE_LINEDEVSTATE message can be controlled with lineSetStatusMessages. An application can indicate status item changes about which it wants to be notified. By default, all status reporting is disabled except for LINEDEVSTATE_REINIT, which cannot be disabled. This message is sent to all applications that have a handle to the line, including those that called the lineOpen function with the dwPrivileges parameter set to LINECALLPRIVILEGE_NONE, LINECALLPRIVILEGE_OWNER, LINECALLPRIVILEGE_MONITOR, or permitted combinations of these.
The dwParam1 parameter does not support the following constants:
|Windows Embedded CE||Windows CE 3.0 and later|
|Windows Mobile||Windows Mobile Version 5.0 and later|