The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Jan 29, 2016
Post comments count 0
Post likes count 1

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

Raymond Chen

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

Jan 28, 2016
Post comments count 0
Post likes count 1

Why is getting the HP_HASHSIZE so weird?

Raymond Chen

Second-order logic.

Jan 27, 2016
Post comments count 0
Post likes count 1

Why does CryptDestroyHash crash, but only sometimes?

Raymond Chen

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

Jan 26, 2016
Post comments count 0
Post likes count 1

Some senior executives are afraid to provide feedback, because they know that their feedback will be given too much weight

Raymond Chen

Excess baggage.

Jan 25, 2016
Post comments count 0
Post likes count 2

How can I tell whether my console program was launched from Explorer or from a command prompt?

Raymond Chen

That's not actually what you want to know.

Jan 22, 2016
Post comments count 0
Post likes count 1

If I’m going to store a SID in a file, should I store the string form or the binary form?

Raymond Chen

Pros and cons.

Jan 21, 2016
Post comments count 0
Post likes count 1

What does the /V (verify) flag to XCOPY mean, and how did it get that way?

Raymond Chen

It doesn't mean much any more.

Jan 20, 2016
Post comments count 0
Post likes count 1

So how bad is it that I’m calling RegOpenKey instead of RegOpenKeyEx?

Raymond Chen

Mostly not bad, except for the gotcha.

Jan 19, 2016
Post comments count 0
Post likes count 1

What makes XCOPY so X?

Raymond Chen

It's extra awesome. But I don't know what the X stands for.