Re: Dealing with HANDLEs
- From: adebaene@xxxxxxxxxxxxxxxx
- Date: 1 Dec 2006 08:38:05 -0800
On 1 déc, 16:45, "Le Chaud Lapin" <jaibudu...@xxxxxxxxx> wrote:
Jake Forson wrote:
I disagree with both of you. There is nothing intrinsically wrong or harmful
with copying a handle.
I agree, the problem is not a technical one : It is perfectly ok to use
DuplicateHandle as long as you play along the rules, but that's not the
point...
The problem I noticed is about object model : It's just rather
unnatural that a "Process" class is copyable. If there were such a
class, I would expect than, when an instance is duplicated, a new
process is launched (forked) on the system, and I doublt that is what
the OP wants
"Process" is just an identity object, who shouldn't be copyable for
semantic reasons ; as Jake as said, if you need to put them in an STL
collection, use (smart)pointers.
Arnaud
MVP - VC
.
- Follow-Ups:
- Re: Dealing with HANDLEs
- From: Le Chaud Lapin
- Re: Dealing with HANDLEs
- From: Ben Menashe
- Re: Dealing with HANDLEs
- References:
- Dealing with HANDLEs
- From: Ben Menashe
- Re: Dealing with HANDLEs
- From: Arnaud Debaene
- Re: Dealing with HANDLEs
- From: Pavel Lebedinsky [MSFT]
- Re: Dealing with HANDLEs
- From: adebaene
- Re: Dealing with HANDLEs
- From: Jake Forson
- Re: Dealing with HANDLEs
- From: Le Chaud Lapin
- Dealing with HANDLEs
- Prev by Date: Re: How to get imagebase after a DLL gets loaded
- Next by Date: Re: Dealing with HANDLEs
- Previous by thread: Re: Dealing with HANDLEs
- Next by thread: Re: Dealing with HANDLEs
- Index(es):
Relevant Pages
|