File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121#include <windows.h>
2222#include <ioapiset.h>
2323#include "msapi_utf8.h"
24+ #include "rufus.h"
2425
2526#pragma once
2627
@@ -170,10 +171,12 @@ static __inline BOOL GetSizeAsync(HANDLE h, LPDWORD lpNumberOfBytes)
170171 return FALSE;
171172 }
172173 fd -> Overlapped .bOffsetUpdated = TRUE;
173- // No timeout call for Windows 7
174- if (!GetOverlappedResult (fd -> hFile , (OVERLAPPED * )& fd -> Overlapped ,
175- lpNumberOfBytes , (fd -> iStatus < 0 )))
176- return (GetLastError () == ERROR_HANDLE_EOF );
174+ if (WindowsVersion .Version >= WINDOWS_XP ) {
175+ // No timeout call for Windows 7
176+ if (!GetOverlappedResult (fd -> hFile , (OVERLAPPED * )& fd -> Overlapped ,
177+ lpNumberOfBytes , (fd -> iStatus < 0 )))
178+ return (GetLastError () == ERROR_HANDLE_EOF );
179+ }
177180 fd -> Overlapped .Offset += * lpNumberOfBytes ;
178181 return TRUE;
179182}
You can’t perform that action at this time.
0 commit comments