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.

53 lines
1.0 KiB

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