tag:blogger.com,1999:blog-971876119771204189.post7672058385544915343..comments2024-03-12T22:24:25.119-07:00Comments on Of Filesystems And Other Demons: The Flags of FILE_OBJECTs - Part VAnonymoushttp://www.blogger.com/profile/04456600991354270152noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-971876119771204189.post-51334183974255799732012-08-15T13:48:26.780-07:002012-08-15T13:48:26.780-07:00Christian, thanks for taking the time and explaini...Christian, thanks for taking the time and explaining this! Finally it makes sense! :)Anonymoushttps://www.blogger.com/profile/04456600991354270152noreply@blogger.comtag:blogger.com,1999:blog-971876119771204189.post-85836705783616435212012-08-10T18:08:06.649-07:002012-08-10T18:08:06.649-07:00Although the docs aren't updated yet, CreateFi...Although the docs aren't updated yet, CreateFile2 (in Windows 8 RTM) doesn't allow opening a file that you don't have write access to if you don't specify FILE_SHARE_READ, whether called from a Metro app or not. It does indeed use FILE_DISALLOW_EXCLUSIVE internally.<br /><br />The purpose is to close the long-standing problem where a caller who doesn't have the right to modify a file is able to deny read access to callers who do have the right to modify the file. The logic is that if all you can do is read a file, there's no good reason why you should be able to prevent others from reading it.Christian Allred [MSFT]noreply@blogger.comtag:blogger.com,1999:blog-971876119771204189.post-2706965642912580252012-07-23T14:06:19.456-07:002012-07-23T14:06:19.456-07:00CreateFile2 is documented to disallow exclusive op...CreateFile2 is documented to disallow exclusive opens of nonwritable files when called from a Metro app. Perhaps it uses FILE_DISALLOW_EXCLUSIVE internally.Anonymousnoreply@blogger.com