声明了一个类的静态函数:
UINT __stdcall fnKillDeviceHint(LPVOID lpVoid);
实现:
UINT __stdcall CSample::fnKillDeviceHint(LPVOID lpVoid)
{
......
}
在另一个函数中如此使用:
_beginthreadex(NULL, 0, fnKillDeviceHint, NULL, 0, NULL);
结果提示:
error C2664: '_beginthreadex' : cannot convert parameter 3 from 'unsigned int (void *)' to 'unsigned int (__stdcall *)(void *)'
        None of the functions with this name in scope match the target type还有一 个类似的错误:
BOOL CALLBACK myEnumWin(HWND hWnd, LPARAM lParam);
BOOL CALLBACK CSample::myEnumWin(HWND hWnd, LPARAM lParam)
{
......
}
 error C2664: 'EnumWindows' : cannot convert parameter 1 from 'int (struct HWND__ *,long)' to 'int (__stdcall *)(struct HWND__ *,long)'
        None of the functions with this name in scope match the target type这是怎么回事,不说静态函数可以用于线程函数吗?