-
hInstance
MSDN defination for hInstance : "A handle to the current instance of the application."
What does that mean ?? and what exactly is an instance?? Is that a pointer ?? If yes, what does it point to ?? I would really appreciate if someone could give me a detailed description...
-
Open Calculator on your desktop ... THAT is one instance of Calculator.
HInstance is a handle needed by window creation, menus, and a whole host of other functions to identify the correct program and instance when passing commands or requesting data. Each instance of a program gets it's own memory space, it's own set of handles, it's own stack and so on... this handle --not a pointer, a handle-- is how Windows knows what's where.
For all your needs as a programmer, Handles are merely identifiers that you need to refer to things -- much like your own name is your "handle" and has no meaning other than it's reference to you.
The value or type of these handles is of no consequence to you. These are just identifiers you pass around in your program as needed.
-
so does that mean that it is a handle (a void pointer), which stores the base address of our applications code in memory??
-
No it means exactly what I said it means...
You are on here as "Juice" ... that's your handle. It is a way to identify you and has no meaning beyond that.
A handle is simply the means by which Windows internally identifies your program and it has no meaning beyond that.
Really... DO NOT turn this into yet another boondoggle like your EOF threads over in C Programming.
You've already burned most of your support here, don't make it worse.