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.

46 lines
748 B

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