VirtualBox

Changeset 6431 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 21, 2008 10:41:13 PM (17 years ago)
Author:
vboxsync
Message:

Support seeking to xxxxxxxx'ffffffff on windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/fileio-win.cpp

    r5999 r6431  
    6767inline bool MySetFilePointer(RTFILE File, uint64_t offSeek, uint64_t *poffNew, unsigned uMethod)
    6868{
     69    bool            fRc;
    6970    LARGE_INTEGER   off;
     71
    7072    off.QuadPart = offSeek;
    7173#if 1
    72     off.LowPart = SetFilePointer((HANDLE)File, off.LowPart, &off.HighPart, uMethod);
    73     bool fRc = off.LowPart != INVALID_SET_FILE_POINTER;
     74    if (off.LowPart != INVALID_SET_FILE_POINTER)
     75    {
     76        off.LowPart = SetFilePointer((HANDLE)File, off.LowPart, &off.HighPart, uMethod);
     77        fRc = off.LowPart != INVALID_SET_FILE_POINTER;
     78    }
     79    else
     80    {
     81        SetLastError(NO_ERROR);
     82        off.LowPart = SetFilePointer((HANDLE)File, off.LowPart, &off.HighPart, uMethod);
     83        fRc = GetLastError() == NO_ERROR;
     84    }
    7485#else
    75     bool fRc = SetFilePointerEx((HANDLE)File, off, &off, uMethod);
     86    fRc = SetFilePointerEx((HANDLE)File, off, &off, uMethod);
    7687#endif
    7788    if (fRc && poffNew)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette