TAPI 2.2 event notification manner problem

101 views Asked by At

I have a technical issue and kindly wish to help me. I have developed a console application sample to catch a caller ID using TAPI 2.2. I have faced a problem with some modem drivers (not all), I can’t catch the caller ID.

My objective is to use the TAPI to monitor caller ID only, I don’t need it to make calls or other media capabilities.

My code use TAPI event notification manner (LINEINITIALIZEEXOPTION_USEEVENT) and run thread to monitor this event as:

while (true) {
        switch (WaitForSingleObject((HANDLE)(pLine->m_hLineEvent), 1000))
        {
        case WAIT_OBJECT_0:
                pLine->ProcessEvent();
        case WAIT_TIMEOUT:
            break;
        default: continue;
        }
}

The exact problem is a m_hLineEvent event member doesn’t get any object by the TAPI library, so the while always timeout, but everything ok and my program runs well when I run external software like (Advanced caller id, smartcallmonitor, …etc.) !!! “I don’t expect this software set object manually and my application catch it, as I know the TAPI will set it automatically when calling info available”.

Does any help please? Note: My full program code available at: TAPI Samble

0

There are 0 answers