[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

what exactly is a handle

Posted on 2006-06-25
8
Medium Priority
?
165 Views
Last Modified: 2010-04-23
I have read on handles a bit but I am still unsure of what it is. Is it a pointer like in c. What exacly is a handle?

Thanks

San
0
Comment
Question by:Sanmarie
  • 4
  • 4
8 Comments
 
LVL 37

Expert Comment

by:Harisha M G
ID: 16979549
Hi, it is a unique identifier assigned by Windows to almost every object it creates..

Basically, it is an unsigned integer. (Just a typedef)

---
Harish
0
 

Author Comment

by:Sanmarie
ID: 16979593
So, it is a unique identifier that points to every object in windows, kind of like a integer pointer if you know C ?

So this means that I can get the control by using its integer handle value?

Thanks
0
 
LVL 37

Accepted Solution

by:
Harisha M G earned 200 total points
ID: 16979662
No, it is NOT a pointer.

It is not the address of any location either.

Say you create a form, and a button inside it.

Then windows will create the following (Not exactly, but as an example)

- Form (Handle: 1)
- Title Bar (Handle: 2)
- Minimize Button (Handle: 3)
- Maximize Button (Handle: 4)
- Close Button (Handle: 5)
- Your Button (Handle: 6)

So, it is just an value to uniquely identify every object in Windows.

You can use Windows APIs to know what is the type, position and property of an object if you know its handle.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Sanmarie
ID: 16979672

excellent!

Thank you

San
0
 

Author Comment

by:Sanmarie
ID: 16979686
I know I closed the question. but just to clarify,

the purpose of a handle is for using the windows api? It uniquely identifies an object in windows but what is its other purpose
0
 

Author Comment

by:Sanmarie
ID: 16979690
thanks for the links

san
0
 
LVL 37

Expert Comment

by:Harisha M G
ID: 16979692
Please go through the above link

Glad I could help !
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question