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.

62 lines
1.4 KiB

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