Visual studio WIN API CreateThread在MFC共享DLL中不可访问?

Visual studio WIN API CreateThread在MFC共享DLL中不可访问?,visual-studio,visual-c++,mfc,Visual Studio,Visual C++,Mfc,我在CreateThread函数中使用了第一个MFC应用程序,但它需要6个参数 使MFC共享DLL所有代码粘贴到DLL应用程序中 但我编译dll,然后得到错误 错误17错误C2660:'CWinThread::CreateThread':函数不接受6个参数 如何在mfc share dll app中使用6个参数访问创建线程函数?您需要在全局名称空间中指定CreateThread函数: HANDLE thread = ::CreateThread( ... ); 谢谢,它工作了。为什么mfc共享

我在CreateThread函数中使用了第一个MFC应用程序,但它需要6个参数

使MFC共享DLL所有代码粘贴到DLL应用程序中

但我编译dll,然后得到错误

错误17错误C2660:'CWinThread::CreateThread':函数不接受6个参数


如何在mfc share dll app中使用6个参数访问创建线程函数?

您需要在全局名称空间中指定
CreateThread
函数:

HANDLE thread = ::CreateThread( ... );

谢谢,它工作了。为什么mfc共享dll应用程序中需要全局名称空间。但这在mfc应用程序中不需要。错误消息显示您正试图从CWinThread的成员函数调用CreateThread。当您这样做时,编译器假定您正在尝试调用与全局函数同名的CWinThread函数。