Solved

TAPI lineAccept

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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Dir function fails on mapped drives 28 132
Visual Studio Debugging 3 132
Please explain "Multi-Tenant Services" 5 85
Authentication of Web Services 3 74
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 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