Hi, I'm a total newbie to asm, but i love it already, now, this may be a dumb question, but when i was looking in tut03 and copying the code i noticed there is the 2 forms of hInstance>, .data?
hInstance HINSTANCE and this>, WinMain proc hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdLine:LPSTR,CmdShow:DWORD
now i read the tut on it and i was wondering is there difference between hInst and hInstance or is it just shortened, thanks.....I hate being new, but I'll get there!
-reservedwordz
Posted on 2002-01-01 04:50:00 by ReservedWordz
HINSTANCE i.e the all caps one is a data type. All it is really is a DWORD.

As for the two variables hInstance is declared in the .data? section so it is a global variable and can be accessed fro anywhere in the program.

Whereas hInst is a local variable and can only be accessed in that proc.

As you study more code you'll find most here don't use a WinMain and so won't have the two types of the same value, however Iczelions style makes things very easy for beginners so it has its advantages in tutorial code.
Posted on 2002-01-01 05:51:02 by Eóin
if i use hInstance where i can also use hInst,then what would happened?
Some days ago,I just did it ,but I found that I never made a mistake at all,please tell me why?
And,sometimes I can't distinguish hWnd from hInstance,in WinMain,hInstance is used always,but in WndProc hWnd instead!
Please help me!I hate being new
Posted on 2005-07-07 19:29:51 by cc123
Hi cc123, welcome to the board :)

In Iczelion's examples, "hInstance" and "hInst" are just variable names, you can name them "MyVar" and they still work. What really matters is that they contain the return value from the GetModuleHandle procedure. Iczelion uses this particular naming style to make it easier to know if it's a local or global variable.

Hope that helps! :)
Posted on 2005-07-08 09:27:35 by QvasiModo
Thank you!
But how do I distinguish between hWnd and hInstance?
Sometimes I feel dark!
Please tell me!
Posted on 2005-07-08 19:09:49 by cc123
hinstance is instance handle to the application (usually set to 400000h) while hwnd is handle to the window. Notice the instance and wnd in hinstance and hwnd? It means handle to instance and handle to window respectively. They are different things.
Posted on 2005-07-09 04:26:32 by roticv
cc123, it might be a bit confusing at first :)

But keep the PlatformSDK documentation handy for reference, and grab a copy of Charles Petzold's "Programming Windows". It's for C, but easily translatable to assembly, and it has very good beginners information.
Posted on 2005-07-09 07:35:51 by f0dder
Thank You!
I'll Work hard!
Posted on 2005-07-10 03:32:41 by cc123

Thank You!
I'll Work hard!

That's the spirit :) - and feel free to ask questions around here, there's usually somebody able & willing to help.
Posted on 2005-07-10 03:51:38 by f0dder