Tag: C++/WinRT

Windows 10 SDK 10.0.19041 needs some massaging

In: Out: 1>—— Build started: Project: CppWinrt01, Configuration: Debug x64 ——1>CppWinrt01.cpp1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(983,26): error C2039: ‘wait_for’: is not a member of ‘winrt::impl’1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(103): message : see declaration of ‘winrt::impl’1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(985): message : see reference to class template instantiation ‘winrt::impl::consume_Windows_Foundation_IAsyncAction’ being compiled1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(1004,26): error C2039: ‘wait_for’: is not a…

Read the full article

1 GB limit for Windows::Storage::FileIO::ReadLinesAsync?

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 – 0x80070057 : ‘The parameter is incorrect.’. The function starts working well when the input file is slightly reduced in size (under 1050 MB).

C++/WinRT version of SetFileTime

SetFileTime is simple and does not deserve a blog post: you have a file handle, you have date/time, you set it. C++/WinRT and UWP make the journey much more exciting. There is StorageItemContentProperties Class which provides access to the content-related properties of an item (like a file or folder). This includes file times which are…

Read the full article

Another API exception which should not have been thrown

From the documentation on StorageFolder.TryGetItemAsync(String) Method: Tries to get the file or folder with the specified name from the current folder. Returns null instead of raising a FileNotFoundException if the specified file or folder is not found. Exception thrown at 0x00007FFB06BDA799 (KernelBase.dll) in DownloadIssue.exe: WinRT originate error – 0x80070002 : ‘An item cannot be found with the specified name…

Read the full article

Best JSON and Base64 libraries for C++ and Windows

The application in previous post Is my system a hybrid (switchable) graphics system? is implemented in C++/WinRT, which I finally decided to give a try. For authoring and consuming Windows Runtime APIs using C++, there is C++/WinRT. This is Microsoft’s recommended replacement for the C++/CX language projection, and the Windows Runtime C++ Template Library (WRL). The real question…

Read the full article