473,490 Members | 2,489 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

HANDLE

In C++, there is datatype HANDLE
void* HANDLE

then HANDLE is similar to "file handle"?

which is unique identifier for a file, for a process, for a thread ...
etc

which is returned by a function when it's creating something - like
creating a thread, creating a process, creating a file ... etc

Apr 9 '08 #1
5 1662
Eric Kaplan wrote:
In C++, there is datatype HANDLE
void* HANDLE

then HANDLE is similar to "file handle"?

which is unique identifier for a file, for a process, for a thread ...
etc

which is returned by a function when it's creating something - like
creating a thread, creating a process, creating a file ... etc
In standard C++ terms, it's probably just used as an opaque, unique
identifier. You would get more input on a windows programming group.

--
Ian Collins.
Apr 9 '08 #2

"Eric Kaplan" <to*********@yahoo.comwrote in message
news:ip********************************@4ax.com...
In C++, there is datatype HANDLE
Funny, it doesn't show up in any of my books as a primitive type.
I think you mean, "In the Windows SDK there is a data type HANDLE"
void* HANDLE

then HANDLE is similar to "file handle"?
Why not look it up in the MSDN?
Apr 9 '08 #3
On Apr 8, 7:48 pm, "Christopher Pisz" <some...@somewhere.netwrote:
"Eric Kaplan" <tobycraf...@yahoo.comwrote in message

news:ip********************************@4ax.com...
In C++, there is datatype HANDLE

Funny, it doesn't show up in any of my books as a primitive type.
I think you mean, "In the Windows SDK there is a data type HANDLE"
void* HANDLE
then HANDLE is similar to "file handle"?

Why not look it up in the MSDN?
In computer science terms a 'handle' is a pointer to a pointer to a
resource.
The concept was used by many OS to allow the easy movements of
resources in memory.

But this is not specifically a C++ concept and you would need to look
up a comp-sci book to get full details.
Apr 9 '08 #4
On Apr 9, 6:58 am, Martin York <Martin.YorkAma...@gmail.comwrote:
On Apr 8, 7:48 pm, "Christopher Pisz" <some...@somewhere.netwrote:
[...]
In computer science terms a 'handle' is a pointer to a pointer to a
resource.
The concept was used by many OS to allow the easy movements of
resources in memory.
Do you have a reference for that? I've always understood a
handle to be an opaque data type, used by some service providers
as an identifier of something. It could be a pointer to a
pointer, a simple pointer, an int, or even a string: just about
anything else the service provider wants to use. The critical
point was always that the type and semantics were opaque to the
client.

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Apr 9 '08 #5
On 9 Apr, 10:05, James Kanze <james.ka...@gmail.comwrote:
On Apr 9, 6:58 am, Martin York <Martin.YorkAma...@gmail.comwrote:
On Apr 8, 7:48 pm, "Christopher Pisz" <some...@somewhere.netwrote:
In computer science terms a 'handle' is a pointer to a pointer to a
resource.
The concept was used by many OS to allow the easy movements of
resources in memory.

Do you have a reference for that? *
the MAC used to do this. I'm not sure it's particularly
widely used.

I've always understood a
handle to be an opaque data type, used by some service providers
as an identifier of something. *It could be a pointer to a
pointer, a simple pointer, an int, or even a string: just about
anything else the service provider wants to use. *The critical
point was always that the type and semantics were opaque to the
client.
on Unix it was common for a handle to be a small integer.
Think file handles.

C's FILE* is very handle like

--
Nick Keighley

"One of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination of
their C programs."
Apr 9 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1386
by: Kong Li | last post by:
Follow up to this thread, the latest Oracle 9i release 2 patchset (9.2.0.5) fixed the handle count leak problem. The problem is in Oracle client component. Thanks. Kong ----- From: Kong...
7
3221
by: Tony Johansson | last post by:
Hello!! Assume I have a handle body pattern with classes called Handle and Body. In the Body class I store one int value for example 7 or some other integer value. In the Handle class I have...
0
2155
by: Tony Johansson | last post by:
Hello! Here I have two classes these are called Handle and Body and a main. You have the class definition below. Some basic information. In the Handle class is there a pointer to the Body. Each...
2
3011
by: Indiana Epilepsy and Child Neurology | last post by:
Before asking this questions I've spent literally _years_ reading (Meyer, Stroustrup, Holub), googling, asking more general design questions, and just plain thinking about it. I am truly unable to...
14
2706
by: Howard | last post by:
Hi, I recently had a problem where I decided to store objects in a vector. (Previously, I had always stored pointers in vectors). Well, naturally, when storing an object in a vector, using...
6
2830
by: Leandro Berti via DotNetMonster.com | last post by:
Hi All, I wrote a code to do serial communication with an equipament. When i use the code outside of threaded class it seens work properly, but when i put inside a class and execute a thread in...
7
1798
by: Ken Varn | last post by:
I am working in managed C++. I have a Mutex object in which I need to replace the Handle property with a new handle. The new handle is being constructed using Win32 CreateMutex call. I need to...
13
4888
by: Abhishek | last post by:
Hi, how do I pass the handle of a control to the win32 api mouse_event. so that it will create the click event on that application only even if there is any other window in front of it. I dont...
2
35487
weaknessforcats
by: weaknessforcats | last post by:
Handle Classes Handle classes, also called Envelope or Cheshire Cat classes, are part of the Bridge design pattern. The objective of the Bridge pattern is to separate the abstraction from the...
3
3128
by: Peterwkc | last post by:
Hello all C++ expert programmer, I have a handle class which point to another class and use the pointer as object. I follow the code from C++ articles submited by someone in this forum....
0
7112
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7146
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7183
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7356
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5448
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1389
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
628
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.