|
Subject:
|
TAPI IN VC++
|
|
Posted By:
|
hina
|
Post Date:
|
9/4/2005 3:40:46 AM
|
hi sumone can plz help me...... how to use tapi in vc++ to make outbound calls
|
|
Reply By:
|
jbryce
|
Reply Date:
|
9/22/2005 5:21:02 AM
|
http://mysite.verizon.net/robert.bamberg/csells.htm has source code for the book "Windows Telephony programming" written by Chris Sells. The source code includes an easy framework for TAPI. This should help you get started.
|
|
Reply By:
|
m_mudassir_saeed
|
Reply Date:
|
10/6/2005 1:15:55 AM
|
#include <tapi.h>
void CALLBACK LineCallBackProc(DWORD hDevice,DWORD dwMessage,DWORD dwInstance,DWORD dwParam1,DWORD dwParam2,DWORD dwParam3) { } HLINEAPP g_hLineApp; HLINE g_hLine; HCALL g_hCall;
DWORD g_dwAPIVersion; DWORD g_dwNumLineDev; void main() { DWORD lRetVal; g_dwAPIVersion = 0x00020001; lRetVal = lineInitializeEx(&g_hLineApp,(LINECALLBACK)LineCallBackProc,NULL, "TapiMsgs",&g_dwNumLineDev,&g_dwAPIVersion,0); if(lRetVal != 0) prinf("lineInitializeEx failed...\n");
lRetVal = lineOpen(g_hLineApp, 0/*Here give DeviceID*/, &g_hLine, g_dwAPIVersion,0,1,LINECALLPRIVILEGE_OWNER,LINEMEDIAMODE_INTERACTIVEVOICE,NULL); if(lRetVal != 0) prinf("lineOpen failed...\n");
lRetVal = lineMakeCall(g_hLine,&g_hCall, "8890"/*Dest Address*/,0,0); if(lRetVal != 0) prinf("lineMakeCall failed...\n"); }
/*Inshah Allah ... This code will run anywhere... in any windows.. using VC 6.0.. for any question m_mudassir_saeed AT yahooo DOT COM*/
|