Article View: borland.public.cppbuilder.nativeapi
Article #8614Re: How to check a HANDLE?
From: Pavel Vozenilek
Date: Fri, 08 Oct 2004 17:11
Date: Fri, 08 Oct 2004 17:11
17 lines
1397 bytes
1397 bytes
"Ed Mulroy [TeamB]" wrote: > Since there are things like IsBadReadPtr and IsWindow I thought there > might be something like IsValidHandle. > IsBadReadPtr() work the same way: they access memory and if Win32 exception is thrown memory isn't valid. You may use file id to go into deeper layer: FILE* f = fopen(...) int id = fileno(f); ... do something with id to test it /Pavel
Technical Details
Message-ID:
<4166cbac@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<416541a3@newsgroups.borland.com> <41654815$1@newsgroups.borland.com> <41655db3@newsgroups.borland.com> <41657423$1@newsgroups.borland.com> <4165a525@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d6f466f618c24d8b X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Pavel Vozenilek" <pavel_vozenilek@yahoo.co.uk> Newsgroups: borland.public.cppbuilder.nativeapi References: <416541a3@newsgroups.borland.com> <41654815$1@newsgroups.borland.com> <41655db3@newsgroups.borland.com> <41657423$1@newsgroups.borland.com> <4165a525@newsgroups.borland.com> Subject: Re: How to check a HANDLE? Date: Fri, 8 Oct 2004 19:11:56 +0200 Lines: 19 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 83.148.62.180 Message-ID: <4166cbac@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1097255852 83.148.62.180 (8 Oct 2004 10:17:32 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail