zoukankan      html  css  js  c++  java
  • Windows mobile 根据网络地址自动拨号连接GRPS

    BOOL Dial(CString szURL)
    {
    	GUID guid;
    	HANDLE iConnectionHandle = ConnMgrApiReadyEvent();
    	HRESULT hresult = ConnMgrMapURL((LPCTSTR)szURL,&guid,NULL);
    	if (FAILED(hresult))
    	{
    		MessageBox(L"映射地址不成功",L"错误",MB_OKCANCEL);
    		return FALSE;
    	}
    	// Get a connection.
    	CONNMGR_CONNECTIONINFO cinfo;
    	memset(&cinfo,0,sizeof(cinfo));
    	cinfo.cbSize = sizeof(cinfo);
    	cinfo.bDisabled = FALSE;
    	cinfo.bExclusive = FALSE;
    	cinfo.guidDestNet = guid;
    	cinfo.dwParams = CONNMGR_PARAM_GUIDDESTNET;
    	cinfo.dwFlags = CONNMGR_FLAG_PROXY_HTTP;
    	cinfo.dwPriority = CONNMGR_PRIORITY_USERINTERACTIVE;
    	DWORD status;
    	hresult = ConnMgrEstablishConnectionSync				(&cinfo,&iConnectionHandle,15000,&status);
    	if (FAILED(hresult))
    	{
    		MessageBox(L"拨号不成功",L"错误",MB_OKCANCEL);
    		return FALSE;
    	}
    	return TRUE;
    }
  • 相关阅读:
    费马小定理
    Big Number阶乘位数计算(斯特林公式)
    V
    矩阵快速幂求斐波那契
    奇迹
    缘分
    求导
    拓扑排序
    线段树
    单调栈
  • 原文地址:https://www.cnblogs.com/lartely/p/1995133.html
Copyright © 2011-2022 走看看