Solved

what exactly is a handle

Posted on 2006-06-25
8
156 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 50 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
 
LVL 37

Expert Comment

by:Harisha M G
ID: 16979682
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

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Modal Popup Extender control 1 51
VB.NET 2008 - Windows Protected Your PC 7 52
Convert datetime to time string 10 34
vb.net background worker crossthread 11 28
This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

735 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