R.Wieser
2024-06-13 14:45:19 UTC
Hello all,
A program of mine uses
CreateFile,offset [@@FLE_Temp],GENERIC_WRITE or GENERIC_READ,
FILE_SHARE_READ, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_TEMPORARY or
FILE_FLAG_DELETE_ON_CLOSE, 0
to open a temporary, auto-deleting file.
But sometimes have the need to save the contents of that temporary file.
I've tried MoveFile as well as CopyFile, but both complain about the source
file being open (it is, no debate about that). As far as I know that
FILE_SHARE_READ flag should have been enough, but it looks like I'm missing
something ...
Anyone have an idea what I'm missing ?
Remark: Windows XP sp3
Regards,
Rudy Wieser
A program of mine uses
CreateFile,offset [@@FLE_Temp],GENERIC_WRITE or GENERIC_READ,
FILE_SHARE_READ, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_TEMPORARY or
FILE_FLAG_DELETE_ON_CLOSE, 0
to open a temporary, auto-deleting file.
But sometimes have the need to save the contents of that temporary file.
I've tried MoveFile as well as CopyFile, but both complain about the source
file being open (it is, no debate about that). As far as I know that
FILE_SHARE_READ flag should have been enough, but it looks like I'm missing
something ...
Anyone have an idea what I'm missing ?
Remark: Windows XP sp3
Regards,
Rudy Wieser