Category: Uncategorized

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

DXGI desktop snapshot taking

One more system check tool to quickly enumerate available monitors (using DXGI), take snapshots and was them in PNG files (using WIC). Apart from straightforward desktop snapshot taking, the tool offers a few more functions: Goes through the entire list of available video adapters and connected monitors Uses three slightly different methods to do the…

Read the full article

GetFileVersionInfoSize and API sets

GetFileVersionInfoSizeW function in Requirements section lists: Minimum supported client Windows Vista [desktop apps only] Minimum supported server Windows Server 2008 [desktop apps only] Target Platform Windows Header winver.h (include Windows.h) Library Version.lib DLL Api-ms-win-core-version-l1-1-0.dll and this is inaccurate. The actual requirement DLL is api-ms-win-core-version-l1-1-1.dll instead. However, what does it mean exactly? Windows API sets: API Sets rely…

Read the full article