I haven't been able to get this to work. None of the attributes that I'm
looking at (read-only, hidden, archive, indexing service, or file times)
are transferred to the file being created.
My template file was opened with GENERIC_READ as required by the
CreateFile() documentation and GENERIC_WRITE was specified in the call
to CreateFile() when creating the new file. Is there anything else that
needs to be specified?
I have be able to apply all of these attributes by using a combination
of GetFileAttributesEx(), SetFileTime(), and SetFileAttributes(). When
doing this, the only access modes required are FILE_READ_ATTRIBUTES and
FILE_READ_EA for the source file and FILE_WRITE_ATTRIBUTES and
FILE_WRITE_EA for the created file.
I would prefer not to use SetFileAttributes() as it requires a file name
string rather than a handle which implies an additional pass through the
file look-up system; this may cause an annoying loss of performance
because my application will be creating files on a remote system.
--
Norm
To reply, change domain to an adult feline.
I'm naturally assuming you are specifying CREATE_NEW rather than
CREATE_ALWAYS. (Reason: if you ain't creating a new one ...)
> --
> Norm
>
> To reply, change domain to an adult feline.
You know, I had to think for about 10 seconds to figure out what you
probably meant. You have left the spammers behind, definitely. You almost
left me behind.
Your statement is a little ambiguous: do you mean blackXXXassociates or
XXX.com. I'm guessing the first one. I didn't want to put the actual name
there, in case some clever spam spider would pick it up.
The Lizard