Solved

TAPI lineAccept

Posted on 1997-06-09
2
315 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

705 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now