Microspeak: The train
Work on Windows occurs in several different branches of the source code, and changes in one branch propagate to other branches. The goal is to push changes toward the trunk on a regular cadence. I will...
View ArticleAdding a confirmation dialog to every drag/drop operation does not solve the...
A customer wanted to know how to enable a confirmation dialog whenever the user inadvertently perform a drag/drop operation in Explorer to move files within a volume. For example, if I have an S drive...
View ArticleAll I/O on a synchronous file handle is serialized; that's why it's called a...
File handles are synchronous by default. If you want asynchronous file handles, you need to pass the FILE_FLAG_OVERLAPPED flag when you create the handle. And all operations on a synchronous file...
View ArticleIf I attach a file to an existing completion port, do I have to close the...
There are two ways of calling the CreateIOCompletionPort function. You can pass a null pointer as the ExistingCompletionPort parameter, indicating that you would like to create a brand new...
View ArticleWhy doesn't the "Automatically move pointer to the default button in a dialog...
The Mouse control panel has a setting called Automatically move pointer to the default button in a dialog box, known informally as Snap to default button or simply Snap To. You may have discovered...
View ArticleThe challenge of improvisational historical comedy
I dreamed that one of my friends signed me up for some sort of combination Punk’d/Thank God You’re Here improv show without my knowledge, and I had to explain how her husband had unwittingly coined...
View ArticleHow can I find out which process and user is modifying a file?
When troubleshooting a problem, you may discover that a file is being modified that shouldn’t, and you figure out would be nice if there were some way of finding out which process is modifying the file...
View ArticleThe format of data and custom resources
Continuing the highly-sporadic series of Win32 resource formats, today we’ll look at the format of RT_DATA resources, which are declared in resource files as RCDATA. Also the format of custom...
View ArticleHow can I write to a file only as long as nobody's looking?
A customer wanted to know how to detect that the user has opened Notepad to view a particular file. They had come up with method based on polling and sniffing the Notepad title bar, but they found that...
View ArticleCan an x64 function repurpose parameter home space as general scratch space?
We saw some time ago that the x64 calling convention in Windows reserves space for the register parameters on the stack, in case the called function wants to spill them. But can the called function...
View Article
More Pages to Explore .....