franky
May 23rd, 1999, 01:00 PM
My socket software works differently in debug version and release version
i traced down to the problem of multithreading.
In Release mode
if i chosed debug multithreaded DLL (project->setting->C/C++ Tab-> Category:
Code Generation -> user runtime library) , my program worked fine! if i use regular
multithreaded DLL. my socket generates trashcode.
My thread class was derived from CWinThread, the sockets class were dyanimically
allocated in one of the functions in my thread class
i began the thread in one of the view's constructor.
T = (CMyThread*)AfxBeginThread(RUNTIME_CLASS(CMyThread), 0, 0, 0);
What could be wrong?
Franky
http://innocreations.cjb.net
i traced down to the problem of multithreading.
In Release mode
if i chosed debug multithreaded DLL (project->setting->C/C++ Tab-> Category:
Code Generation -> user runtime library) , my program worked fine! if i use regular
multithreaded DLL. my socket generates trashcode.
My thread class was derived from CWinThread, the sockets class were dyanimically
allocated in one of the functions in my thread class
i began the thread in one of the view's constructor.
T = (CMyThread*)AfxBeginThread(RUNTIME_CLASS(CMyThread), 0, 0, 0);
What could be wrong?
Franky
http://innocreations.cjb.net