PRB: TAPI Callback Function Not Called When Using a Hidden Window for Notification (228448)



The information in this article applies to:

  • Microsoft Win32 Application Programming Interface (API), when used with:
    • the operating system: Microsoft Windows 95
    • the operating system: Microsoft Windows 98
    • the operating system: Microsoft Windows Millennium Edition
    • the operating system: Microsoft Windows NT 4.0
    • the operating system: Microsoft Windows 2000
    • the operating system: Microsoft Windows XP

This article was previously published under Q228448

SYMPTOMS

The TAPI callback function does not get called if you use the hidden window method of event notification in a TAPI application by calling lineInitializeEx with the dwOptions field in the LINEINITIALIZEEXPARAMS structure set to LINEINITIALIZEEXOPTION_USEHIDDENWINDOW, or by calling lineInitialize.

CAUSE

When the hidden window method of notification is used in a TAPI application, TAPI creates a hidden window for the application in the context of the thread that called lineInitializeEx. If the thread that calls lineInitializeEx does not retrieve and dispatch windows messages, the hidden window does not receive Windows messages, and in turn, the callback function registered by the TAPI application is not called.

NOTE: Calling lineInitialize is equivalent to calling lineInitializeEx with the LINEINITIALIZEEXOPTION_USEHIDDENWINDOW option, so using lineInitialize instead of lineInitializeEx results in the same behavior.

RESOLUTION

Make sure the thread that calls lineInitializeEx or lineInitialize contains a message loop that retrieves and dispatches messages for the hidden window.

STATUS

This behavior is by design.

Modification Type:MinorLast Reviewed:9/27/2004
Keywords:kbAPI kbKernBase kbprb kbTAPI KB228448