CreateThread( ) is the Windows API for creating a thread, and
_beginthreadex( ) is the CRT's equivalent. _beginthreadex( ), in addition
to calling CreateThread( ), sets up a number of thread-specific structures
and data, which are used throughout CRT calls. Now, if you use
CreateThread( ), these structures are not set up, and effectively, the CRT is
not available to your thread.
You
can get away with using CreateThread( ), but it's actually very hard to do
so. According to the implementation, even some language features (like
static variables, IINM) might not work if you call CreateThread(
). So, unless you're programming in another language, always stick
with _beginthreadex( ) so that the C/C++ standard library stuff don't
stop working.
--------- List Owner: [EMAIL PROTECTED] [Email: [EMAIL PROTECTED]]
|
- [msvc] _beginthread or CreateThread??? Weston Fryatt
- Re: [msvc] _beginthread or CreateThread??? Max
- Re: [msvc] _beginthread or CreateThread??? Weston Fryatt
- Ehsan Akhgari
