PDA

View Full Version : Simple sample


ocena
19-02-2003, 11:29 AM
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
19-02-2003, 08: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
19-02-2003, 08:40 PM
Thanks. I was trying whole afternoon and i done it. Next thing is to recerd to call. Maybe tomorow. :D