怎样实现拔号的功能?

liucs6666 2009-12-18 09:34:41
根据实际查出的电话号码,实现拔号的功能?
...全文
139 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
liucs6666 2009-12-18
  • 打赏
  • 举报
回复
[DllImport("Coredll")]
public static extern bool ShellExecuteEx(ref SHELLEXECUTEINFO lpExecInfo);

[StructLayout(LayoutKind.Sequential)]
public struct SHELLEXECUTEINFO //用于ShellExecuteEx
{
public int cbSize;
public uint fMask;
public IntPtr hwnd;
public string lpVerb;
public string lpFile;
public string lpParameters;
public string lpDirectory;
public int nShow;
public IntPtr hInstApp;
public int lpIDList;
public string lpClass;
public IntPtr hkeyClass;
public int dwHotKey;
public IntPtr hIcon;
public IntPtr hProcess;

}

SHELLEXECUTEINFO info = new SHELLEXECUTEINFO();
//info.lpVerb = "open";
//info.lpFile = "\\windows\\cprog.exe";
info.lpParameters = "cprog.exe -url tel:121";
//info.nShow = "SW_SHOWNORMAL";


ShellExecuteEx(ref info);

还是不行
ppc_2008 2009-12-18
  • 打赏
  • 举报
回复
tapiRequestMakeCall()这个函数简单易用
V-Far 2009-12-18
  • 打赏
  • 举报
回复
\Windows Mobile 6 SDK\Samples\PocketPC\CS\PocketOutlookSample
这个例子好像有拨号的....
liucs6666 2009-12-18
  • 打赏
  • 举报
回复
// Set up the call with the specified number.
PHONEMAKECALLINFO pmci;
memset(&pmci, 0, sizeof(pmci));
pmci.cbSize = sizeof(pmci);
pmci.dwFlags = PMCF_DEFAULT;
pmci.pszDestAddress = L"112";

// Make the phone call.
(void)PhoneMakeCall(&pmci);
liucs6666 2009-12-18
  • 打赏
  • 举报
回复
C#里怎样实现呢
文斌 2009-12-18
  • 打赏
  • 举报
回复
tapiRequestMakeCall(pszPhone, NULL, NULL, NULL);
世外涛缘 2009-12-18
  • 打赏
  • 举报
回复
摘自MSDN:
Header: Shellapi.h.
Link Library: Coredll.lib.
世外涛缘 2009-12-18
  • 打赏
  • 举报
回复
Shellapi.h.
liucs6666 2009-12-18
  • 打赏
  • 举报
回复
帮顶一下
liucs6666 2009-12-18
  • 打赏
  • 举报
回复
想通过ShellExecuteEx来运行cprog.exe,并输入号码.以下为部分代码
SHELLEXECUTEINFO info;
memset(&info,0,sizeof(SHELLEXECUTEINFO));
info.cbSize = sizeof(info);
info.fMask = SEE_MASK_FLAG_NO_UI;
info.hwnd = NULL;
info.lpVerb = _T("open");
info.lpFile = _T("\\windows\\cprog.exe");
info.lpParameters = _T("-n -url tel:02078544566";
info.lpDirectory = _T("");
info.nShow = SW_SHOWNORMAL;
info.hInstApp = NULL;
ShellExecuteEx(&info);

但需要引用哪些包我就不知道了
liucs6666 2009-12-18
  • 打赏
  • 举报
回复
[DllImport("cellcore")]
public static extern bool tapiRequestMakeCall(String lpszDestAddress, String lpszAppName, String lpszCalledParty, String lpszComment);



tapiRequestMakeCall("114", null, null, null);

确实方便

7,655

社区成员

发帖
与我相关
我的任务
社区描述
Windows Phone是微软发布的一款手机操作系统,它将微软旗下的Xbox LIVE游戏、Zune音乐与独特的视频体验整合至手机中。
社区管理员
  • Windows客户端开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧