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.

63 lines
1.4 KiB

  1. #include <stdinc.h>
  2. HANDLE
  3. W32::FindFirstFileExW(
  4. PCWSTR lpFileName,
  5. FINDEX_INFO_LEVELS fInfoLevelId,
  6. LPVOID lpFindFileData,
  7. FINDEX_SEARCH_OPS fSearchOp,
  8. LPVOID lpSearchFilter,
  9. DWORD dwAdditionalFlags,
  10. DWORD &rdwWin32Error,
  11. ULONG cELEV,
  12. va_list ap
  13. )
  14. {
  15. rdwWin32Error = ERROR_SUCCESS;
  16. HANDLE h = ::FindFirstFileExW(lpFileName, fInfoLevelId, lpFindFileData, fSearchOp, lpSearchFilter, dwAdditionalFlags);
  17. if ((h == INVALID_HANDLE_VALUE) && (cELEV != 0))
  18. {
  19. if (::IsLastErrorInList(cELEV, ap, rdwWin32Error))
  20. h = NULL;
  21. }
  22. return h;
  23. }
  24. HANDLE
  25. W32::FindFirstFileExW(
  26. PCWSTR lpFileName,
  27. FINDEX_INFO_LEVELS fInfoLevelId,
  28. LPVOID lpFindFileData,
  29. FINDEX_SEARCH_OPS fSearchOp,
  30. LPVOID lpSearchFilter,
  31. DWORD dwAdditionalFlags,
  32. DWORD &rdwWin32Error,
  33. ULONG cELEV,
  34. ...
  35. )
  36. {
  37. va_list ap;
  38. HANDLE h;
  39. va_start(ap, cELEV);
  40. h = W32::FindFirstFileExW(lpFileName, fInfoLevelId, lpFindFileData, fSearchOp, lpSearchFilter, dwAdditionalFlags, rdwWin32Error, cELEV, ap);
  41. va_end(ap);
  42. return h;
  43. }
  44. HANDLE
  45. W32::FindFirstFileExW(
  46. PCWSTR lpFileName,
  47. FINDEX_INFO_LEVELS fInfoLevelId,
  48. LPVOID lpFindFileData,
  49. FINDEX_SEARCH_OPS fSearchOp,
  50. LPVOID lpSearchFilter,
  51. DWORD dwAdditionalFlags
  52. )
  53. {
  54. DWORD x;
  55. return W32::FindFirstFileExW(lpFileName, fInfoLevelId, lpFindFileData, fSearchOp, lpSearchFilter, dwAdditionalFlags, x, 0);
  56. }