Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function returns the next TAPI message that is queued for delivery to an application that is using the Event Handle notification mechanism. For more information about the Event Handle notification mechanism, see lineInitializeEx.

Syntax

LONG WINAPI lineGetMessage(
  HLINEAPP 
hLineApp,
  LPLINEMESSAGE 
lpMessage,
  DWORD 
dwTimeout
);

Parameters

hLineApp

The handle returned by the lineInitializeExfunction. The application must have set the LINEINITIALIZEEXOPTION_USEEVENT option in the dwOptionsmember of the LINEINITIALIZEEXPARAMSstructure.

lpMessage

Pointer to a LINEMESSAGEstructure. Upon successful return from this function, the structure contains the next message that had been queued for delivery to the application.

dwTimeout

The time-out interval, in milliseconds. The function returns if the interval elapses, even if no message can be returned. If dwTimeoutis zero, the function checks for a queued message and returns immediately. If dwTimeoutis INFINITE, the function's time-out interval never elapses.

Return Value

Returns zero if the request succeeds or a negative error number if an error occurs. The following table shows the return values for this function.

Value Description

LINEERR_INVALAPPHANDLE

Invalid handle

LINEERR_OPERATIONFAILED

No message could be fetched from the queue.

LINEERR_INVALPOINTER

Invalid pointer

LINEERR_NOMEM

No memory available

Remarks

If the lineGetMessagefunction has been called with a non-zero time-out and the application calls the lineShutdownfunction on another thread, lineGetMessagereturns immediately with LINEERR_INVALAPPHANDLE.

If the time-out expires, or was zero, and no message could be fetched from the queue, the function returns with the error LINEERR_OPERATIONFAILED.

Requirements

Header tapi.h
Library coredll.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also