3 回答
TA贡献1775条经验 获得超8个赞
CreateThread()
_beginthread() & _beginthreadex()CreateThread()CreateThread()_beginthread/ex()
_beginthreadex()
TA贡献1828条经验 获得超3个赞
_beginthread()_beginthreadex(). _beginthreadex()CreateThread()
_beginthread()/_beginthreadex()CreateThread()
CreateThread()
_beginthread()/_beginthreadex()_beginthread()
_beginthreadex()
Differences between _beginthread/_endthread and the "ex" versions: 1) _beginthreadex takes the 3 extra parameters to CreateThread which are lacking in _beginthread(): A) security descriptor for the new thread B) initial thread state (running/asleep) C) pointer to return ID of newly created thread 2) The routine passed to _beginthread() must be __cdecl and has no return code, but the routine passed to _beginthreadex() must be __stdcall and returns a thread exit code. _endthread likewise takes no parameter and calls ExitThread() with a parameter of zero, but _endthreadex() takes a parameter as thread exit code. 3) _endthread implicitly closes the handle to the thread, but _endthreadex does not! 4) _beginthread returns -1 for failure, _beginthreadex returns 0 for failure (just like CreateThread).
_beginthreadex()GetCurrentPackageId()
TA贡献1799条经验 获得超8个赞
_beginthread()/_endthread()ex()DllMainDLL_THREAD_ATTACHDLL_THREAD_DETACHCreateThread()ExitThread()
DllMain
- 3 回答
- 0 关注
- 429 浏览
添加回答
举报
