Solved

TAPI lineAccept

Posted on 1997-06-09
2
325 Views
Last Modified: 2013-12-03
I've created a program using TAPI interface, and here is it's fragment:

void AcceptThread(LPVOID lpVoid)
{ g_lAcceptID = lineAccept((HCALL)lpVoid, NULL, 0);
  g_hevtAccept = CreateEvent(NULL, FALSE, FALSE, NULL);
  WaitForSingleObject(g_hevtAccept, INFINITE);
  g_lAcceptID = 0;
  CloseHandle(g_hevtAccept);
  if(g_lAcceptResult == LINECALLSTATE_CONNECTED)
   {
   }
  else
   HangUp();
}

VOID FAR PASCAL lineCallbackFunc(HANDLE hDevice, DWORD dwMsg,
                                 DWORD dwCallbackInstance, DWORD dwParam1,
                                                 DWORD dwParam2, DWORD dwParam3)
{ switch(dwMsg)
   { case LINE_CALLSTATE:
       switch(dwParam1)
          {
              case LINECALLSTATE_OFFERING:
              AddToLog("Ring");
            RunThread((LPTHREAD_START_ROUTINE)AcceptThread, (LPVOID)hDevice);
               break;
              case LINECALLSTATE_ACCEPTED:
              AddToLog("Call accepted");
        }
       if(g_lAcceptID != 0)
         { g_lAcceptResult = dwParam1;
           SetEvent(g_hevtAccept);
         }
   }
}

My program receives ring notification, starts lineAccept() in separate thread,
lineAccept() returns Ok, but modem doesn't really answer the call.
0
Comment
Question by:shvetsov
  • 2
2 Comments
 
LVL 15

Accepted Solution

by:
NickRepin earned 100 total points
ID: 1397979
Of course, it doesn't!
0
 
LVL 15

Expert Comment

by:NickRepin
ID: 1397980
Your first answer impressed me very much :-)
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question