Skip to main content
gamedev.net
🔒 Locked

Handles?

Started by yq 2 replies 550+ views
Original Post
yq
yq
Will somebody explane handles to me
Dire.Wolf
Dire.Wolf
Handles as in what? Love handles, door handles or Windows'' handles?

A handle as a generic term can either be a proxy class or a ''token'' of some form that has a specific meaning/value.

Once you clarify what kind of handles you are talking about I''ll try and help.

- Dire Wolf
direwolf@digitalfiends.com
[email=direwolf@digitalfiends.com]Dire Wolf[/email]
www.digitalfiends.com
vbisme
vbisme
hmmm...Handles are like imitations of actual objects.

Let''s say you have a bitmap file and you want to load it into your program, you would load it to a "bitmap handle." From there you would do what ever to the handle which contain has the data of the bitmap file.

Get it?
Sheltem
Sheltem
I''m going to assume you mean Windows handles like HWND. Basically, it is an ID for an object(stucture) created interanally by Windows. Here''s is basically how I guess you do this. When you call a CreateObject() function or whatever it creates a structure that has fields of information in it and one of those fields it assigns is its handle or ID and that is what is (usually) returned from the function. Then when you call UseObject() function, one of the paramaters is the handle that was returned so it knows which internal object you are reffering to by checking the hanldes. Basically, it''s to provide some object-based programming in C.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.