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.

51 lines
938 B

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