LINE_GENERATE

The LINE_GENERATE message is sent to notify the application that the current digit or tone generation has terminated. Only one such generation request can be in progress an a given call at any time. This message is also sent when digit or tone generation is canceled.

LINE_GENERATE
dwDevice = (DWORD) hCall;
dwCallbackInstance = (DWORD) hCallback;
dwParam1 = (DWORD) GenerateTermination;
dwParam2 = (DWORD) 0;
dwParam3 = (DWORD) 0;
 

Parameters

dwDevice
A handle to the call.
dwCallbackInstance
The callback instance supplied when opening the line.
dwParam1
The reason why digit or tone generation was terminated. This parameter must be one and only one of the following LINEGENERATETERM_ constants:
LINEGENERATETERM_DONE
The requested number of digits have been generated, or the requested tones have been generated for the requested duration.
LINEGENERATETERM_CANCEL
The digit or tone generation request was canceled by this application, by another application, or because the call terminated.
dwParam2
Unused.
dwParam3
The "tick count" (number of milliseconds since Windows started) at which the digit or tone generation completed. For API versions earlier than 2.0, this parameter is unused.

Return Values

No return value.

Remarks

The LINE_GENERATE message is only sent to the application that requested the digit or tone generation.

Because the timestamp specified by dwParam3 may have been generated on a computer other than the one on which the application is executing, it is useful only for comparison to other similarly timestamped messages generated on the same line device (LINE_GATHERDIGITS, LINE_MONITORDIGITS, LINE_MONITORMEDIA, LINE_MONITORTONE), in order to determine their relative timing (separation between events). The tick count can "wrap around" after approximately 49.7 days; applications must take this into account when performing calculations.

If the service provider does not generate the timestamp (for example, if it was created using an earlier version of TAPI), then TAPI provides a timestamp at the point closest to the service provider generating the event so that the synthesized timestamp is as accurate as possible.

QuickInfo

  Version: Use TAPI version 1.4 and later.
  Header: Declared in tapi.h.

See Also

LINE_GATHERDIGITS, LINE_MONITORDIGITS, LINE_MONITORMEDIA, LINE_MONITORTONE