The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: anuradha on May 25, 2007, 12:19:06 PM

Title: help on Iczelion's tutorial 3!!!
Post by: anuradha on May 25, 2007, 12:19:06 PM
hi people !
its me again

i have 3 questions regarding  Iczelion's tutorial 3!!! anyone please help me

1. what is an instance handle???

2. when creating a window in asm what is the purpose of calling GetModuleHandle() function ??

3.
hInstance HINSTANCE ?
CommandLine LPSTR ?
is it possiable to cosider these "hinstance" & "commandLine" as class variables??

cna anyone help me please!!!!!!! :'( :'(
Title: Re: help on Iczelion's tutorial 3!!!
Post by: hutch-- on May 25, 2007, 01:13:41 PM
anuradha,

Originally you use the GetModuleHandle() API to get the actual instance handle for the main application that is running. On an EXE file it is at address 400000h but on a DLL it can be over a wide address range due to DLLs being able to be relocated. Some API calls still require an instance handle so they can find things like resources within an EXE file.