cpprestsdk icon indicating copy to clipboard operation
cpprestsdk copied to clipboard

possible to handle large file on 32bit application

Open elliotllb opened this issue 4 years ago • 1 comments

  1. use below code to open large file like 6G, fileStream.tell() will get 0.

file_stream::open_istream(fileToUpload

size_t __cdecl _seekrdtoend_fsb

auto newpos = SetFilePointer(fInfo->m_handle, (LONG)(offset * char_size), nullptr, FILE_END);

if (newpos == INVALID_SET_FILE_POINTER) return static_cast<size_t>(-1);

Refer to https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-setfilepointer

elliotllb avatar Aug 18 '21 21:08 elliotllb

see above

elliotllb avatar Aug 18 '21 21:08 elliotllb