标题:[求助]利用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



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-137294-1-1.html




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

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