{"id":2088,"date":"2020-07-29T16:14:53","date_gmt":"2020-07-29T14:14:53","guid":{"rendered":"https:\/\/alax.info\/blog\/?p=2088"},"modified":"2020-07-29T16:14:53","modified_gmt":"2020-07-29T14:14:53","slug":"1-gb-limit-for-windowsstoragefileioreadlinesasync","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/2088","title":{"rendered":"1 GB limit for Windows::Storage::FileIO::ReadLinesAsync?"},"content":{"rendered":"\n<p>There seem to be a limit of 1GB for <code>FileIO::ReadLinesAsync<\/code> API even though <a href=\"https:\/\/docs.microsoft.com\/en-us\/uwp\/api\/windows.storage.fileio.readlinesasync?view=winrt-19041\">documentation<\/a> is silent on this.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>StorageFile EventStorageFile { TryGetFile(m_Configuration.m_ApplicationStorageFolder, m_FileName) };\nif(!EventStorageFile)\n    return;\nusing namespace winrt::Windows::Storage;\nauto const LineVector { FileIO::ReadLinesAsync(EventStorageFile).get() };<\/code><\/pre>\n\n\n\n<p>The exception message itself adds no clarity:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>WinRT originate error &#8211; 0x80070057 : &#8216;The parameter is incorrect.&#8217;.<\/p><\/blockquote>\n\n\n\n<p>The function starts working well when the input file is slightly reduced in size (under 1050 MB).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There seem to be a limit of 1GB for FileIO::ReadLinesAsync API even though documentation is silent on this. The exception message itself adds no clarity: WinRT originate error &#8211; 0x80070057 : &#8216;The parameter is incorrect.&#8217;. The function starts working well when the input file is slightly reduced in size (under 1050 MB).<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[588,549],"class_list":["post-2088","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-c-winrt","tag-uwp"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/2088","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=2088"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/2088\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=2088"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=2088"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=2088"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}