1

Topic: ZwCreateFile: Why GENERIC_ALL does not give ?

So works: DesiredAccess = FILE_APPEND_DATA | SYNCHRONIZE; And so for some reason is not present (instead of  re-records a file): DesiredAccess = GENERIC_ALL | FILE_APPEND_DATA; Well, and so too: DesiredAccess = GENERIC_ALL; to Everyone it is clear that such here "generic" - also, as well as "for dummies" it is malicious, of which it is necessary to get rid. But what exactly there the superfluous? It is declared so: #define GENERIC_ALL (0x10000000L) That too is very bad, by the way. Laziness with it was to paint a constant normally, whether that... P.S. CreateDisposition = FILE_OPEN_IF CreateOptions = FILE_SYNCHRONOUS_IO_NONALERT

2

Re: ZwCreateFile: Why GENERIC_ALL does not give ?

Hello, sergey77666, you wrote: S> it Is declared so: S> S>#define GENERIC_ALL (0x10000000L) S> S> That too is very bad, by the way. Laziness with it was to paint a constant normally, whether that... Generic-masks are applicable to all types of objects (not only to files), always seniors of 4 bits in a 32-bit mask, and  on different values. For files is FILE_GENERIC_* constants, still is IoGetFileObjectGenericMapping (+ RtlMapGenericMask)

3

Re: ZwCreateFile: Why GENERIC_ALL does not give ?

FILE_WRITE_TO_END_OF_FILE, also it is not necessary any FILE_APPEND_DATA

4

Re: ZwCreateFile: Why GENERIC_ALL does not give ?

Hello, ononim, you wrote: O> FILE_WRITE_TO_END_OF_FILE, also it is not necessary any FILE_APPEND_DATA So it for ZwWriteFile? And I write a wrapper for create and for write where the minimum of parameters and superfluous at all by the way, append should be in create, and to throw it it is impossible, as (while) the wrapper uses normal , instead of the structure. Certainly, would not prevent to make the structure, and not struct, and a class, all on OOP to make, but for the sake of what, for the sake of 1 order in 3 years?

5

Re: ZwCreateFile: Why GENERIC_ALL does not give ?

S> So it for ZwWriteFile? And I write a wrapper for create and for write where the minimum of parameters and superfluous at all by the way, append should be in create, and to throw it it is impossible, as (while) the wrapper uses normal , instead of the structure. The wrapper means except write should have a method append

6

Re: ZwCreateFile: Why GENERIC_ALL does not give ?

Hello, ononim, you wrote: S>> So it for ZwWriteFile? And I write a wrapper for create and for write where the minimum of parameters and superfluous at all by the way, append should be in create, and to throw it it is impossible, as (while) the wrapper uses normal , instead of the structure. O> the wrapper means except write You should have a method append though time saw such wrapper?  NET, Qt etc. unless so? No, there append - parameter at file discovery.