windows-api

Tag

Cards List
#windows-api

What’s the highest legal FILETIME? Is it safe to use?

The Old New Thing (Raymond Chen) ↗ · 2026-09-21 Cached

The article discusses the highest legal FILETIME value in Windows programming, its limitations, and recommends using sentinel values cautiously to prevent overflow and compatibility issues.

0 favorites 0 likes
#windows-api

Why didn’t Read­Directory­ChangesW provide a way to correlate the two sides of a rename operation?

The Old New Thing (Raymond Chen) ↗ · 2026-09-14 Cached

Raymond Chen explains why the Windows API ReadDirectoryChangesW doesn't provide correlation for rename operations, due to an unwritten assumption that rename events are sequential, which may not hold with concurrent activities.

0 favorites 0 likes
#windows-api

Reducing C++ template bloat by factoring out the type-dependent portions of the function, practical exam

The Old New Thing (Raymond Chen) ↗ · 2026-08-21 Cached

The article explains how to reduce C++ template bloat by factoring out type-dependent portions of functions, using a practical example with Windows DispatcherQueueHandler to de-templatize code.

0 favorites 0 likes
#windows-api

A little helper class for managing LPPROC_THREAD_ATTRIBUTE_LISTs

The Old New Thing (Raymond Chen) ↗ · 2026-08-13 Cached

This blog post presents a C++ helper class using the Windows Implementation Library (WIL) to manage LPPROC_THREAD_ATTRIBUTE_LIST allocations with RAII, offering both throwing and non-throwing variants.

0 favorites 0 likes
#windows-api

How can I perform a Copy­File in unbuffered mode?

The Old New Thing (Raymond Chen) ↗ · 2026-08-10 Cached

Explains how to use the COPY_FILE_NO_BUFFERING flag with CopyFileEx and CopyFile2 to copy files using unbuffered handles, and why the progress callback cannot be used to change buffering after the handles are opened.

0 favorites 0 likes
#windows-api

I opened a file with FILE_FLAG_DELETE_ON_CLOSE, but now I changed my mind

The Old New Thing (Raymond Chen) ↗ · 2026-07-06 Cached

Explains that FILE_FLAG_DELETE_ON_CLOSE is irreversible, but you can achieve conditional deletion by using SetFileInformationByHandle to toggle the delete disposition.

0 favorites 0 likes
#windows-api

A constant-space linear-time algorithm for deleting all but the 10 most recent files in a directory

The Old New Thing (Raymond Chen) ↗ · 2026-05-14 Cached

This article describes a constant-space linear-time algorithm using a min-priority queue to delete all but the 10 most recent files in a directory, avoiding the O(n) space of sorting all entries.

0 favorites 0 likes
← Back to home

Submit Feedback