Program call function Summary
1 cprog.exe:
Const tchar szcmd [] = _ T ("-n-URL Tel: 10086 ");
CreateProcess (_ T ("// windows // cprog.exe"), szcmd, null, 0, null );
This method does not allow direct dialing, but calls out the dialing interface. For example:
http://www.devdiv.net/home/attachment/200904/2/12_1238667943Se3N.jpg </img
2 phonemakecall
Bool bresult;
Phonemakecallinfo;
Bresult = false;
Phonemakecallinfo. cbsize = sizeof (phonemakecallinfo );
Phonemakecallinfo. dwflags = pmcf_default;
// Phonemakecallinfo. dwflags = pmcf_promptbeforecalling;
Phonemakecallinfo. pszdestaddress = _ T ("10086 ");
Phonemakecallinfo. pszappname = NULL;
Phonemakecallinfo. pszcalledparty = NULL;
Phonemakecallinfo. pszcomment = NULL;
Long lresult = phonemakecall (& phonemakecallinfo );
If (lresult = 0)
{
Bresult = true;
}
Else
{
Bresult = false;
}
3 tapirequestmakecall:
Tapirequestmakecall (_ T ("10086"), null );
4 ril_dial:
Ril_dial (g_rilhandle, (lpcstr) "10086", ril_calltype_voice, ril_dialopt_restrictid );
Call through ril_dial. If the parameters are correct, the call is successful. However, whether the receiver or microphone of the mobile phone can be opened at the same time is another problem.
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/czbever/archive/2009/07/14/4348709.aspx
Get call records
Handle pH;
Calllogentry entry;
DWORD count, pp;
Entry. cbsize = sizeof (calllogentry );
If (phoneopencalllog (& pH) = s_ OK)
{
If (s_ OK = phoneseekcalllog (pH, calllogseek_end, 0, & COUNT ))
{
Tchar C [4];
Wsprintf (C, _ T ("% d"), count );
Afxmessagebox (C );
For (INT I = 0; I <count + 1; I ++)
{
Phoneseekcalllog (pH, calllogseek_end, I, & PP );
If (phonegetcalllogentry (pH, & entry) = s_ OK)
// MessageBox (afxgetmainwnd (), entry. psznumber, entry. pszname, null );
Afxmessagebox (entry. psznumber );
// Afxmessagebox (entry. IOM );
// Afxmessagebox (entry. pszname );
}
}
}
Phoneclosecalllog (ph );
# Pragma comment (Lib, "phone. lib ")
# Include "phone. H"
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/xingyuanwang/archive/2008/11/28/3404338.aspx