There seem to be a limit of 1GB for FileIO::ReadLinesAsync
API even though documentation is silent on this.
StorageFile EventStorageFile { TryGetFile(m_Configuration.m_ApplicationStorageFolder, m_FileName) };
if(!EventStorageFile)
return;
using namespace winrt::Windows::Storage;
auto const LineVector { FileIO::ReadLinesAsync(EventStorageFile).get() };
The exception message itself adds no clarity:
WinRT originate error – 0x80070057 : ‘The parameter is incorrect.’.
The function starts working well when the input file is slightly reduced in size (under 1050 MB).