ReactOS 0.4.16-dev-927-g467dec4
wrename.cpp File Reference
#include <corecrt_internal.h>
#include <io.h>
Include dependency graph for wrename.cpp:

Go to the source code of this file.

Functions

int __cdecl _wrename (wchar_t const *const old_name, wchar_t const *const new_name)
 

Function Documentation

◆ _wrename()

int __cdecl _wrename ( wchar_t const *const  old_name,
wchar_t const *const  new_name 
)

Definition at line 15 of file wrename.cpp.

16{
17 // The MOVEFILE_COPY_ALLOWED flag alloes moving to a different volume.
18 if (!MoveFileExW(old_name, new_name, MOVEFILE_COPY_ALLOWED))
19 {
21 return -1;
22 }
23
24 return 0;
25}
void __cdecl __acrt_errno_map_os_error(unsigned long)
Definition: errno.cpp:91
BOOL WINAPI MoveFileExW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName OPTIONAL, IN DWORD dwFlags)
Definition: move.c:1120
#define MOVEFILE_COPY_ALLOWED
Definition: filesup.h:29
DWORD WINAPI GetLastError(void)
Definition: except.c:1042