The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

What’s the difference between setting a page’s protection to <CODE>PAGE_NOACCESS</CODE> and freeing it?
Oct 19, 2023
Post comments count 3
Post likes count 1

What’s the difference between setting a page’s protection to PAGE_NOACCESS and freeing it?

Raymond Chen
Raymond Chen

Nobody can access it, but it's still there.

How can I check if I’m on a DispatcherQueue’s thread if I can’t call HasThreadAccess?
Oct 18, 2023
Post comments count 3
Post likes count 2

How can I check if I’m on a DispatcherQueue’s thread if I can’t call HasThreadAccess?

Raymond Chen
Raymond Chen

Looking at the tools you have available.

Microspeak: The As-Appropriate (AA) interviewer
Oct 17, 2023
Post comments count 5
Post likes count 1

Microspeak: The As-Appropriate (AA) interviewer

Raymond Chen
Raymond Chen

So, how are things going so far?

API design principle: Reading a property or adding an event handler should not alter observable behavior
Oct 16, 2023
Post comments count 9
Post likes count 2

API design principle: Reading a property or adding an event handler should not alter observable behavior

Raymond Chen
Raymond Chen

Don't punish people for looking.

On detecting improper use of <CODE>std::<WBR>enable_<WBR>shared_<WBR>from_<WBR>this</CODE>
Oct 13, 2023
Post comments count 0
Post likes count 1

On detecting improper use of std::enable_shared_from_this

Raymond Chen
Raymond Chen

Playing around with the standard library.

I created an overloaded operator for my C++/WinRT class, but it’s not working
Oct 12, 2023
Post comments count 0
Post likes count 0

I created an overloaded operator for my C++/WinRT class, but it’s not working

Raymond Chen
Raymond Chen

Take a closer look at what you are overloading.

Why does <CODE>IFileDialog</CODE> still show non-filesystem folders when I pass <CODE>FOS_<WBR>FORCE­FILE­SYSTEM</CODE>?
Oct 11, 2023
Post comments count 13
Post likes count 2

Why does IFileDialog still show non-filesystem folders when I pass FOS_FORCE­FILE­SYSTEM?

Raymond Chen
Raymond Chen

Because you need to pass through them to get there.

It rather required being on the other side of this airtight hatchway: Knowing the domain administrator password
Oct 10, 2023
Post comments count 5
Post likes count 1

It rather required being on the other side of this airtight hatchway: Knowing the domain administrator password

Raymond Chen
Raymond Chen

If you give away the password, well, that's sort of on you.

Is there any performance advantage to marking a page read-only if I had no intention of writing to it anyway?
Oct 9, 2023
Post comments count 2
Post likes count 1

Is there any performance advantage to marking a page read-only if I had no intention of writing to it anyway?

Raymond Chen
Raymond Chen

The CPU already figured it out.