首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

windows核心编程-运行程序异常

2012-01-20 
windows核心编程---运行程序错误我现在刚开始学习Windows核心编程,但是运行第一章得程序有错误,我用得是vc

windows核心编程---运行程序错误
我现在刚开始学习Windows核心编程,但是运行第一章得程序有错误,我用得是vc6++
//////////////////////////////////////////////////////////////////////
Compiling...
ErrorShow.cpp
F:\windows核心编程\windows核心编程\01-ErrorShow\ErrorShow.cpp(140)   :   error   C2664:   'DialogBoxParamA '   :   cannot   convert   parameter   4   from   'long   (struct   HWND__   *,unsigned   int,unsigned   int,long) '   to   'int   (__stdcall   *)(struct   HWND__   *,unsigned   int,unsi
gned   int,long) '
                None   of   the   functions   with   this   name   in   scope   match   the   target   type
Error   executing   cl.exe.
////////////////////////////////////////////////////////////
出错的代码:
      DialogBoxParam(hinstExe,   MAKEINTRESOURCE(IDD_ERRORSHOW),  
                  NULL,   Dlg_Proc,   _ttoi(pszCmdLine));
我把Winuser.h和windows.h都包进去了,但是运行就是通不过,请高手帮帮忙

[解决办法]
Dlg_Proc的声明有错误。
int __stdcall Dlg_Proc

回调函数必须用__stdcall修饰

热点排行