|
-
May 13th, 1999, 10:39 AM
#1
CWinThread and ON_THREAD_MESSAGE
I have a multi-threaded application that I have been careful to keep thread-safe. Everything works fine in Debug mode (naturally), but when I switch to Release mode, I get a GPF. In my derived CWinThread object, I manually entered ON_THREAD_MESSAGE(TM_DO_ACTION, OnDoAction) and I have defined TM_DO_ACTION to be (WM_APP + 1). I naturally added the prototype, manually, in the class definition under the AFX_MSG message map section.
Now, when I comment the CWinThread's message map for the thread message out, there is no GPF. When I remove the comments and respond to the message (int i; i = 7 the program crashes with the standard GPF. Why would a program crash simply because I am adding a message map function to respond to a custom thread message?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|