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.

47 lines
811 B

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