The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

The overly complicated rules for American football
Feb 5, 2016
Post comments count 0
Post likes count 0

The overly complicated rules for American football

Raymond Chen
Raymond Chen

Attempting to close a loophole creates another loophole.

If I issue a second overlapped I/O operation without waiting for the first one to complete, are they still guaranteed to complete in order?
Feb 5, 2016
Post comments count 0
Post likes count 0

If I issue a second overlapped I/O operation without waiting for the first one to complete, are they still guaranteed to complete in order?

Raymond Chen
Raymond Chen

Of course not. That's why it's called "overlapped."

How do I prevent a child process from displaying the Windows Error Reporting dialog?
Feb 4, 2016
Post comments count 0
Post likes count 0

How do I prevent a child process from displaying the Windows Error Reporting dialog?

Raymond Chen
Raymond Chen

Take advantage of the fact that SetErrorMode is inherited.

Localization gotcha: The RTL question mark
Feb 3, 2016
Post comments count 0
Post likes count 0

Localization gotcha: The RTL question mark

Raymond Chen
Raymond Chen

Depends on the locale.

What happened to the ability to use … (three dots) to refer to the grandparent directory?
Feb 2, 2016
Post comments count 0
Post likes count 1

What happened to the ability to use … (three dots) to refer to the grandparent directory?

Raymond Chen
Raymond Chen

An old NetWare compatibility hack.

A brief tour of the console alias functions
Feb 1, 2016
Post comments count 0
Post likes count 0

A brief tour of the console alias functions

Raymond Chen
Raymond Chen

Kicking the tires.

Does the thread pool have different handle access privileges? Why am I getting ERROR_INVALID_HANDLE?
Jan 29, 2016
Post comments count 0
Post likes count 0

Does the thread pool have different handle access privileges? Why am I getting ERROR_INVALID_HANDLE?

Raymond Chen
Raymond Chen

The most common reason for getting ERROR_INVALID_HANDLE is that you have an invalid handle.

Why is getting the HP_HASHSIZE so weird?
Jan 28, 2016
Post comments count 0
Post likes count 0

Why is getting the HP_HASHSIZE so weird?

Raymond Chen
Raymond Chen

Second-order logic.

Why does CryptDestroyHash crash, but only sometimes?
Jan 27, 2016
Post comments count 0
Post likes count 0

Why does CryptDestroyHash crash, but only sometimes?

Raymond Chen
Raymond Chen

Improper destruction leads to undefined behavior, and undefined behavior includes "crashing only sometimes".