Program call function Summary

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.