Because Workplace Shell objects are running under the Workplace process, they can be accessed by any thread belonging to that process. And, as such, may have methods invoked upon them from any of these threads. Some Workplace Shell methods require the thread in which they were invoked to have a PM message queue. Therefore, when writing your own threads, in your subclass' implementation, make sure to do the following, even if your thread does not need a message loop:
hab = WinInitialize(0); if (hab) { hmq = WinCreateMsqQueue(hab,0); if (hmq) { WinCancelShutdown(hmq, TRUE); . . . } }
Note: