Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

what exactly is a handle

Posted on 2006-06-25
8
Medium Priority
?
163 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
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.

 

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

609 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