错误C2365,新定义;以前的定义是功能,帮助!我 [英] Error C2365, new definition; the previous definition was function,,HELP! ME

查看:421
本文介绍了错误C2365,新定义;以前的定义是功能,帮助!我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

typedef HWND(WINAPI * PROCGETCONSOLEWINDOW)();


PROCGETCONSOLEWINDOW GetConsoleWindow;

typedef HWND (WINAPI * PROCGETCONSOLEWINDOW) ();
PROCGETCONSOLEWINDOW GetConsoleWindow;

推荐答案

GetConsoleWindow函数是已经声明(由Windows.h包含),因此很可能是错误的原因。

The GetConsoleWindow function is already declared (included by Windows.h) and so it is likely that is the cause of the error.

将函数指针变量重命名为其他内容,例如pfGetConsoleWindow。

Rename the function pointer variable to something else, such as pfGetConsoleWindow.

BTW,你还需要纠正对GetProcAddress的调用,以提供函数的正确名称。

BTW, you also need to correct the call to GetProcAddress to provide the proper name of the function.


这篇关于错误C2365,新定义;以前的定义是功能,帮助!我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆