A computer components & hardware forum. HardwareBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » HardwareBanter forum » General Hardware & Peripherals » Storage & Hardrives
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Read-only access to FAT32/NTFS files w/ write locks?



 
 
Thread Tools Display Modes
  #1  
Old April 21st 05, 06:35 PM
Matt
external usenet poster
 
Posts: n/a
Default Read-only access to FAT32/NTFS files w/ write locks?

Hello,

In my application that I'm writing in C++ (and maybe Java),
specifically the cygwin flavor of C++, I want to be able to open any
existing files in FAT32 or NTFS file systems (in Windows XP) for
read-only purposes. In particular, I want my program to
unconditionally be able to read-only open any file--and be able to
read all the contents from said fail--which has been marked with any
sort of "exclusionary" lock, including write locks or any other kind
of locks.

Is this possible? Are there any "exclusionary" locks or scenarios
where in WinXP (with either FAT32 or NTFS files) that might prevent
another process from opening a file in read-only mode?

The only case I have experience: using cygwin to unset all file
permissions (including the "read" bit(s)) in an NTFS file system, in
which case non-Administrator processes (presumably) will not be able
to read the file.

Thanks for any help,
-Matt

--
Remove the "downwithspammers-" text to email me.
  #2  
Old April 22nd 05, 04:06 AM
Maxim S. Shatskih
external usenet poster
 
Posts: n/a
Default

Snapshots help a lot.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation

http://www.storagecraft.com

"Matt" wrote in message
...
Hello,

In my application that I'm writing in C++ (and maybe Java),
specifically the cygwin flavor of C++, I want to be able to open any
existing files in FAT32 or NTFS file systems (in Windows XP) for
read-only purposes. In particular, I want my program to
unconditionally be able to read-only open any file--and be able to
read all the contents from said fail--which has been marked with any
sort of "exclusionary" lock, including write locks or any other kind
of locks.

Is this possible? Are there any "exclusionary" locks or scenarios
where in WinXP (with either FAT32 or NTFS files) that might prevent
another process from opening a file in read-only mode?

The only case I have experience: using cygwin to unset all file
permissions (including the "read" bit(s)) in an NTFS file system, in
which case non-Administrator processes (presumably) will not be able
to read the file.

Thanks for any help,
-Matt

--
Remove the "downwithspammers-" text to email me.



  #3  
Old April 22nd 05, 07:01 PM
Kristo
external usenet poster
 
Posts: n/a
Default

Matt wrote:
[a Windows-specific question]

This is off-topic for clc++. Followups set.

Kristo

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Determine write date of files on dvd? Goblin28 Cdr 1 February 16th 05 12:24 PM
novice asks - Installing a scanner John McGaw General 8 September 20th 04 05:19 PM
More life from hard disk with bad sectors Ardent Storage (alternative) 35 July 30th 04 06:34 PM
Question about transfer speeds between HDs, and DMA mode ZigZag Master Storage (alternative) 25 July 25th 04 09:56 PM


All times are GMT +1. The time now is 11:58 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 HardwareBanter.
The comments are property of their posters.