PDA

View Full Version : Simple sample


ocena
19th February 2003, 12:29 PM
Hi all,
i'am a TAPI beginner a i need to write a simple application that makes call. Does anyone have a simple sample how to init TAPI and make call.
Thanks.

Cheesy
19th February 2003, 09:30 PM
If you want to make just a phone call that's easy and you don't need to know anything about TAPI ...

Use the API function PhoneMakeCall, which is documented in the PocketPC 2002 SDK. Don't forget to include phone.h and link to phone.lib


#include <phone.h>
BOOL MyMakeCall(LPCTSTR pszNumber)
{
PHONEMAKECALLINFO pmci;
LONG nRet;

memset(&pmci, 0, sizeof (pmci));
pmci.cbSize = sizeof (pmci);
pmci.dwFlags = PMCF_DEFAULT;
pmci.pszDestAddress = pszNumber;
pmci.pszAppName = NULL;
pmci.pszCalledParty = NULL;
pmci.pszComment = NULL;

// place the call
nRet = PhoneMakeCall(&pmci);
if (nRet != 0)
{
AfxMessageBox (_T("error making call"));
return FALSE;
}
return TRUE;
}

ocena
19th February 2003, 09:40 PM
Thanks. I was trying whole afternoon and i done it. Next thing is to recerd to call. Maybe tomorow. :D