| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 737 人关注过本帖
标题:[求助]利用RAS拨号 回调函数类型不正确
只看楼主 加入收藏
001blue
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2005-10-3
收藏
 问题点数:0 回复次数:0 
[求助]利用RAS拨号 回调函数类型不正确

if (ERROR_SUCCESS == RasDial(
NULL,
NULL,
&rp,
0L,
// NULL, //为NULL时一切正常,能拨号成功
(RASDIALFUNC)RasDialFunc, // 加入这样的回调函数,编译不正常
&hConn))

其中RasDialFunc声明为
void WINAPI RasDialFunc(
UINT unMsg, // type of event that has occurred
RASCONNSTATE rasconnstate, // connection state about to be entered
DWORD dwError // error that may have occurred
);

定义如下:
void WINAPI RasDialFunc(UINT unMsg, RASCONNSTATE rasconnstate, DWORD dwError)
{

//此处填写代码

}


编译时出错,提示如下:

提示:: error C2440: 'type cast' : cannot convert from '' to 'void (__stdcall *)(unsigned int,enum tagRASCONNSTATE,unsigned long)'
None of the functions with this name in scope match the target type


搞了半天了,都不行,网上也都是这样就能成功的,我的就不成功,请各位高手指正.


搜索更多相关主题的帖子: 拨号 类型 函数 回调 RAS 
2007-05-06 18:57
快速回复:[求助]利用RAS拨号 回调函数类型不正确
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017294 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved