The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Grincheux on March 18, 2007, 08:28:25 PM

Title: CreateWindowEx vs CreateThread
Post by: Grincheux on March 18, 2007, 08:28:25 PM
I create a thread with CreateThread.
In this thread I call GetCurrentThread to get an instance handle
In CreateWindowEx I replace the HINSTANCE parameter with the GetCurrentThread handle.

The window is not created.
How can I do ?

Thanks
Title: Re: CreateWindowEx vs CreateThread
Post by: asmfan on March 18, 2007, 08:48:34 PM
HINSTANCE == HMODULE == Base address of process loading (basically 400000h for exe)
Process can have many threads (hThread) but only one HINSTANCE.