Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNo next file
Threads Module Platform Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

6.2 Using the Threads Module with MFC

You may not access and should not attempt to create MFC objects from within threads created using the Threads Module runnable object classes. The MFC library relies on thread-local storage to store handles to any underlying Windows objects that were created within a given thread. The MFC class, CWinThread, creates this thread-local storage when it launches a thread. The restriction on access also applies to MFC threads; one thread may not access an MFC object created by another thread. If you need to manipulate a Windows object encapsulated by an MFC object instance created by another thread, you will need to acquire a handle to underlying Windows object and use that handle to manipulate the object directly.

Although you are not allowed to manipulate MFC instances from the Threads Module, you may still use the Threads Module synchronization and communication mechanisms with threads created by MFC and CWinThread.



Previous fileTop of DocumentContentsNo linkNo next file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.