using PhoneMakeCall

  • Thread starter Thread starter Duncan
  • Start date Start date
D

Duncan

Has anybody got any sample code using PhoneMakeCall to get calls
through the pocket pc using eVc++.

Thanks
 
[DllImport("cellcore.dll")]
extern static int tapiRequestMakeCall(string sAddr, string lpszAppName,
string lpszCalledParty,
string lpszComment );

Call as
tapiRequestMakeCall(phoneNumber, null, null, null)

PhoneMakeCall should be used pretty much the same way
 
Hello Neil,

Thank you for your reply. My project is built as a MFC project. So
when I used

[DllImport("cellcore.dll")]
extern static int tapiRequestMakeCall(string sAddr, string
lpszAppName,
string lpszCalledParty,
string lpszComment );


I get a couple of errors.
[DllImport("cellcore.dll")] - it says missing ; before ]
and

extern static int tapiRequestMakeCall(string sAddr, string
lpszAppName,
string lpszCalledParty,
string lpszComment );

- it says "have more than 1 storage class"

and also I cannot use string as parameters since MFC only allows
CString.

Can you give me a idea to tackle this problem. Can you use the std
namespace in some way in MFC applications.

Thanks in advance

Duncan
 
I actually used

extern int tapiRequestMakeCall(LPCTSTR sAddr, LPCTSTR
lpszAppName,LPCTSTR lpszCalledParty,LPCTSTR lpszComment );

and then call simply tapiRequestMakeCall(_T(""),_T(""),_T(""),_T(""))
but when I try to Link I get,

mfcappDlg.obj : error LNK2019: unresolved external symbol "int __cdecl
tapiRequestMakeCall(unsigned short const *,unsigned short const
*,unsigned short const *,unsigned short const *)"
(?tapiRequestMakeCall@@YAHPBG000@Z) referenced in function "prot
ected: void __cdecl CMfcappDlg::OnButton1(void)"
(?OnButton1@CMfcappDlg@@IAAXXZ)
ARMRel/mfcapp.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

I have included the tapi32.lib, I am not quite sure what I am missing.
 
Remove your declaration (extern int...)
and add
#include <astdtapi.h>

Also you *have to* specify a phone number as the first parameter
 
Back
Top