"raj" <ra*****@gmail.com> wrote in news:1134049498.646468.220340
@g44g2000cwa.googlegroups.com:
Hi,
I just want to know the difference between thread created by
CreateThread and AfxBeginThread function. I got one problem when using
the CreateThread. The appliction malfunction while using the
CreateThread. So is that a problem with this function?
Thanks in advance
Rajat
In microsoft.public.vc.mfc they could have told you that
AfxBeginThread sets up MFC stuff, then calls
_beginthreadex which sets up CRT stuff, then calls
::CreateThread, which is a Win32 API and really creates the thread.
MFC has all kinds of data structures which need to be switched on a per-
thread basis. AfxBeginThread takes care of setting this up. If you call
::CreateThread "behind the back" of MFC, things will not work.
Now, what was your C++ question ?
--
Life is complex, with real and imaginary parts.