Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.0 KiB

  1. #include <stdinc.h>
  2. BOOL
  3. W32::MoveFileExW(
  4. PCWSTR lpExistingFileName,
  5. PCWSTR lpNewFileName,
  6. DWORD dwFlags,
  7. DWORD &rdwWin32Error,
  8. ULONG cELEV,
  9. va_list ap
  10. )
  11. {
  12. rdwWin32Error = ERROR_SUCCESS;
  13. BOOL fSuccess = ::MoveFileExW(lpExistingFileName, lpNewFileName, dwFlags);
  14. if ((!fSuccess) && (cELEV != 0))
  15. {
  16. if (::IsLastErrorInList(cELEV, ap, rdwWin32Error))
  17. fSuccess = TRUE;
  18. }
  19. return fSuccess;
  20. }
  21. BOOL
  22. W32::MoveFileExW(
  23. PCWSTR lpExistingFileName,
  24. PCWSTR lpNewFileName,
  25. DWORD dwFlags,
  26. DWORD &rdwWin32Error,
  27. ULONG cELEV,
  28. ...
  29. )
  30. {
  31. BOOL fSuccess;
  32. va_list ap;
  33. va_start(ap, cELEV);
  34. fSuccess = W32::MoveFileExW(lpExistingFileName, lpNewFileName, dwFlags, rdwWin32Error, cELEV, ap);
  35. va_end(ap);
  36. return fSuccess;
  37. }
  38. BOOL
  39. W32::MoveFileExW(
  40. PCWSTR lpExistingFileName,
  41. PCWSTR lpNewFileName,
  42. DWORD dwFlags
  43. )
  44. {
  45. DWORD x;
  46. return W32::MoveFileExW(lpExistingFileName, lpNewFileName, dwFlags, x, 0);
  47. }