Hi all,
I want to rename a file but i dont know how. I tried to use ReplaceFile but i have not the constant REPLACEFILE_WRITE_THROUGH in the windows.inc. How to do this ? Any help ?
New:
I found MoveFileEx but i have the same problem with MOVEFILE_WRITE_THROUGH.
It is not defined in windows.inc. Anyone knows the value ?
Thank you
Rui
Rui,
Try this API.
BOOL MoveFile(
LPCTSTR lpExistingFileName, // address of name of the existing file
LPCTSTR lpNewFileName // address of new name for the file
);
This is the equate value from winbase.h.
#define MOVEFILE_WRITE_THROUGH 0x00000008
In MASM it should be,
MOVEFILE_WRITE_THROUGH equ 00000008h
LATER:
You must be using a very old windows.inc, the current two file version contains the equate. Download the latest release version from the masm32 subforum.
Hello Hutch,
Thank you.
Yes i think it is a very old windows.inc, but i am going to download the latest release version from the masm32 subforum.
Thanks
Rui