Quantcast
Channel: The Old New Thing
Browsing all 3085 articles
Browse latest View live

If I have a modeless dialog box with custom accelerators, which should I call...

A customer had a modeless dialog box with custom accelerators. If their window had been a modeless dialog box without custom accelerators, then their message dispatch would be if...

View Article


Is it okay to call TryAcquireSRWLock from a thread that has already acquired...

A customer found the MSDN documentation ambiguous. Wouldn't be the first time. In the description of Slim Reader/Writer Locks: An SRW lock is the size of a pointer. The advantage is that it is fast to...

View Article


Adventures in application compatibility: The bogus memory calculation

One of my colleagues shared with me one of his application compatibility stories. There was a program that would fail on some computers but not others, and it wasn't clear why. The problem was traced...

View Article

WaitOnAddress lets you create a synchronization object out of any data...

The Wait­On­Address function is a funny little guy. It lets you create a synchronization object out of 1, 2, 4, or 8 bytes of memory. And you even control the contents of the memory, so the...

View Article

Implementing a synchronization barrier in terms of WaitOnAddress

Last time, I promised to reimplement existing synchronization objects in terms of Wait­On­Address. Note that these are academic exercises rather than recommendations, because you should probably just...

View Article


The International Fair Play Committee announces the Rio 2016 Fair Play...

The International Fair Play Committee announced the winners of the Rio 2016 Fair Play Awards, though you'll be hard-pressed to find those winners because the press release spends over 300 words...

View Article

Implementing a critical section in terms of WaitOnAddress

Last time, we built a synchronization barrier out of Wait­On­Address. Today, we'll build a critical section. Remember that this is an exercise just to demonstrate ways of using Wait­On­Address; in...

View Article

Soarin’ over California + Seattle = Wings over Washington

We already have a giant Ferris wheel. And opening today, right next door to the Great Wheel, we get Wings over Washington, a Washington-themed version of Soarin' over California Around the World,...

View Article


Spurious wakes, race conditions, and bogus FIFO claims: A peek behind the...

We spent the past few days looking at the Wait­On­Address function. Today we're going to peek behind the curtain. Reminder: These are undocumented implementation details and are subject to change at...

View Article


Image may be NSFW.
Clik here to view.

Detecting what language or script a run of text is written in, redux

Some time ago, I discussed the confusion surrounding the question, "How can I detect the language a run of text is in?" because the person asking the question was from an East Asian country, and in...

View Article

What is the NTDiskQuotaSidCache.ndx file for?

A customer was looking for information about the file %LOCAL­APP­DATA%\Microsoft\Windows NT\Disk­Quota\NT­Disk­Quota­Sid­Cache.ndx. All they could find is this KB article. The...

View Article

The ship date predictor: Redux

Last year, I shared the ship date predictor. My colleague who created the chart contacted me last year and told me what happened when he tried to apply the ship date predictor to subsequent projects....

View Article

Discardability in drivers has nothing to do with discardability in user-mode...

Some time ago we discussed what the DISCARDABLE keyword means. In summary: It has no effect in user mode, and in kernel mode, it means that the memory should be thrown away after initialization is...

View Article


A customer question about shortcuts that don’t have a target path

A customer had a question about the Minesweeper shortcut on Windows 7: We found something strange when we tried to retrieve target path information from the Minesweeper shortcut, specifically, the...

View Article

Image may be NSFW.
Clik here to view.

The complicated engineering behind an ice cream social

Moving offices is a time-honored tradition at Microsoft. Some time ago, several teams (including my own) moved into a new building, and my local team had an ice cream social as a housewarming party....

View Article


How to get people who installed a leaked build to stop using that build?

Back in the days before the Windows Insider Program, one of the problems that frustrated the product team was build leaks. These were builds not intended for public consumption, and their existence...

View Article

If I zero out my memory pages, does that make them page in faster?

In an earlier discussion of discardability, I noted that if you allocate some zero-initialized pages and never modify them, then the memory manager can just throw the memory away because it can...

View Article


How can I change a registry key from within the debugger?

If you are using a debugger based on the Windows debugging engine, you can use the !dreg command to dump a registry key, but what if you want to modify a registry key? I don't know how often it...

View Article

How can I get the memory manager to prefetch bigger chunks of data from my...

A customer had a memory-mapped file and they found that when they accessed a page in the mapping, Windows paged in 32KB of memory, even though the documentation says that only 4KB gets paged in. The...

View Article

How can I have a window that rejects activation but still receives pointer...

A customer had a dedicated system with two touch screens. One screen was covered by the main app window, and the other was covered by a secondary window. They needed focus to remain on the main app...

View Article
Browsing all 3085 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>