请看一个EnumResourceNames函数调用中的错误
在对话框中调用
EnumResourceNames( hInstance, RT_MENU, MyEnumProcedure, (LONG)hWnd )
其中 HINSTANCE hInstance
BOOL CALLBACK MyEnumProcedure(HANDLE hModule,LPCTSTR lpszType,
LPTSTR lpszName, LONG lParam)
编译时出现如下错误(只有这一个错误):
error C2664: 'EnumResourceNamesA' : cannot convert parameter 3 from 'int (void *,const char *,char *,long)' to 'int (__stdcall *)(struct HINSTANCE__ *,const char *,char *,long)'
None of the functions with this name in scope match the target type
请教
为什么会出现EnumResourceNamesA,是函数别名?
在MSDN中查EnumResourceNames函数 得到如下定义:
BOOL EnumResourceNames(
HINSTANCE hModule, // resource-module handling
LPCTSTR lpszType, // pointer to resource type
ENUMRESNAMEPROC lpEnumFunc, // pointer to callback function
LONG lParam // application-defined parameter
);
好像我写的没有错误啊?
该如何解决?
谢谢