The Old New Thing

VirtualLock locks your memory into the working set, even if your threads are blocked

Today, a correction to an earlier article on . When you lock memory with , it will remain locked even if all your threads are blocked. As noted in the Follow-up section at the end of the referenced article, the behavior of the operating system never changed. Virtually-locked pages were never unlocked in practice. What changed is that an ...
Comments are closed.0 0
Code

The United States Team uniforms for the opening ceremony is rather hideous, and illegal, and a bit anachronistic

By the time you read this, the opening ceremony for a large sporting event organized by a lawsuit-happy organization may already have taken place. As part of the ceremony, the team representing the United States entered wearing ugly uniforms. They're so ugly that even the hideous Christmas sweater in your closet, the one with the reindeer ...

If an asynchronous I/O completes synchronously, is the hEvent in the OVERLAPPED structure signaled anyway?

Yes. When an I/O completes (whether synchronously or asynchronously), the event is signaled and completion status notifications are queued. The function can be used to wait on an I/O that has already completed; it will merely return immediately. If you ask whether the I/O has completed, and the I/O completed synchronously, it will correctly...
Comments are closed.0 0
Code

How do I prevent folders like My Pictures from being recreated?

Another converse of How do I programmatically create folders like My Pictures if they were manually deleted? and Why do folders like "My Pictures" come back after I delete them? is How do I prevent folders like My Pictures from being recreated? Starting in Windows 7, there is a group policy called Disable Known Folders which lets you ...

Racing email against a snail

The Windows team double-dogfoods Windows Server and Exchange Server, and while this is good for both products, it can be quite frustrating when something goes wrong. I remember back in the early days of the Windows 95 project, the mail servers once got so messed up that some email messages were not delivered for several days. After a ...

How can I make a WNDPROC or DLGPROC a member of my C++ class?

Continuing my discussion of How can I make a callback function a member of my C++ class? Common special cases for wanting to use a member function as a callback function are the window procedure and its cousin the dialog procedure. The question, then, is where to put the reference data. Let's start with window procedures. The function ...
Comments are closed.0 0
Code