Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 Jul : CloseHandle on the multiple CreateEvent or OpenEvent
| Subject: | CloseHandle on the multiple CreateEvent or OpenEvent |
| Posted by: | "ahmoy law" (ahmoyl..@gmail.com) |
| Date: | 24 Jul 2006 06:02:05 |
Hi there,
I have on confusion on the CreateEvent/OpenEvent & CloseHandle
since i can't really understand documentation on the MSDN.
Let say...
var
hEvent1: THandle;
hEvent2: THandle;
hEvent1 := CreateEvent ( 0, FALSE, FALSE, "TEST" );
hEvent2 := CreateEvent ( 0, FALSE, FALSE, "TEST" );
so do i need to call DeleteHandle twice (for hEvent1 & hEvent2)
since hEvent2 is actually the copy version of hEvent1?
and same thing applies to the OpenEvent.
hEvent1 := CreateEvent ( 0, FALSE, FALSE, "TEST2" );
hEvent2 := OpenEvent ( 0, FALSE, "TEST2" );
do i need to call CloseHandle on hEvent1 & hEvent2 again?
Note: i didn't call the DuplicateHandle
Thanks in advance,
ahmoy