Re: How to determine if file handle has write access?
From: Alexander Grigoriev (alegr_at_earthlink.net)
Date: 09/01/04
- Next message: Joe Richards [MVP]: "Re: Question abou AIP function: GetDiskFreeSpaceEx(...)"
- Previous message: Stewart Stevens: "Re: How to retrieve serial number of OS or CPU for copy protection?"
- In reply to: Pieter: "How to determine if file handle has write access?"
- Next in thread: Pieter: "Re: How to determine if file handle has write access?"
- Reply: Pieter: "Re: How to determine if file handle has write access?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 1 Sep 2004 15:51:02 -0700
ERROR_ACCESS_DENIED doesn't occur beause of device error.
Try to call DuplicateHandle with GENERIC_WRITE rights. If it fails, the
source handle doesn't have GENERIC_WRITE.
"Pieter" <msnews@insanegenius.com> wrote in message
news:uHSfN19jEHA.140@TK2MSFTNGP12.phx.gbl...
> How do I determine if a handle to a file has been opened with
> FILE_WRITE_DATA access?
>
> On NT I can call GetSecurityInfo(), but how do I do it on 9x?
>
> If I write to the file using WriteFile() and write 0 bytes, I get an
> access denied error, but how do I know the error is because of the way the
> file was opened, or an actual device error?
>
> Any ideas?
>
> Pieter
>
- Next message: Joe Richards [MVP]: "Re: Question abou AIP function: GetDiskFreeSpaceEx(...)"
- Previous message: Stewart Stevens: "Re: How to retrieve serial number of OS or CPU for copy protection?"
- In reply to: Pieter: "How to determine if file handle has write access?"
- Next in thread: Pieter: "Re: How to determine if file handle has write access?"
- Reply: Pieter: "Re: How to determine if file handle has write access?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|