Microspeak: POR
Remember, Microspeak is not merely for jargon exclusive to Microsoft, but it's jargon that you need to know. The abbreviation POR stands for plan of record. It is always spelled out when spoken:...
View ArticleWhy does misinterpreting UTF16-LE Unicode text as ANSI tend to show up as...
If you misinterpret ANSI text as Unicode, you usually get nonsense Chinese text. If you misinterpret Unicode text as ANSI, why do you usually just get the first character? Okay, this one is a lot...
View ArticleWhat do the output values from CoGetApartmentType mean?
The CoGetApartmentType function returns two pieces of information, documented as follows: APTTYPE enumeration value that specifies the type of the current apartment. APTTYPEQUALIFIER enumeration...
View ArticleOptimizing BitBlt by generating code on the fly
The initial implementation of the BitBlt function in 16-bit Windows didn't have any special tricks. It was static code that supported the sixteen raster operations that involve a source and...
View ArticleThere are no bugs in the I/O manager
Mark Zbikowski told me a story from the early Windows NT days. He found a race condition in the file system code and went to see the lead developer for the I/O subsystem. "There are no bugs in the I/O...
View ArticleWhen Windows copies a file, does it ever copy bytes that in the slack space?
A customer who works with highly sensitive information wanted confirmation that when they copy a file with Explorer, Windows will copy only the data that logically belongs to the file and no data that...
View ArticleWhat’s the difference between the zero width non-joiner and the zero width...
In Break it up, you two!: The zero width non-joiner I discussed the purpose of the zero width non-joiner, which is to request that two adjacent characters be rendered without a ligature. Conversely,...
View ArticleWhy are there two kinds of Universal Windows apps, one for Windows 8 and...
If you create a new Windows app (as opposed to a Win32 program), you have a few choices. One set of choices is under the Windows Universal node, which lets you create a variety of programs described...
View ArticleSo what is a Windows “critical process” anyway?
I noted some time ago that Task Manager applies three somewhat arbitrary criteria for dividing processes into three categories: App, Background Process, and Windows Process. In particular, a Windows...
View ArticleThis is a race the display driver wouldn’t normally expect to lose
One of my colleagues from the Windows 95 project reminded me of a problem that I was called to debug. If the floppy drive was in use, the display driver was more likely to crash. It wound up being a...
View ArticleWe couldn’t create a new partition or locate an existing one, possible...
One of the consequences of being part of the Windows Insiders program is that occasionally you run into a bug so bad that your system doesn't boot. Fortunately, the kernel team was able to diagnose...
View ArticleHow can I call freopen but open the file with shared access instead of...
A customer wants to redirect their program's stdout to a file. They followed the sample code which basically boils down to the line FILE* stream = freopen("output.txt", "w", stdout); or its...
View ArticleWhy does IsPathRelative return FALSE for paths that are drive-relative?
MSDN distinguishes between fully-qualified and relative paths. According to that discussion: A file name is relative to the current directory if it does not begin with one of the following: A UNC...
View ArticleHow do I make sure that my shell extension is at the top of the context menu?
A customer wanted the items for their context menu shell extension to appear at the very top of the context menu. They did this by ignoring the recommended insertion point passed to the...
View ArticleThe 2018/2019 Seattle Symphony subscription season at a glance
For many years, I've put together a little pocket guide to the Seattle Symphony subscription season for my symphony friends to help them decide which ticket package they want. At some point, we may...
View ArticleI just met you, and this is crazy, but here’s my callstack. Debug me maybe.
There was that time a team was hosting a two-day plugfest, and I was volunteered to assist them with debugging any issues in my area that may arise. They booked me to spend two entire days in a...
View ArticleIt rather involved being on the other side of this airtight hatchway:...
In the category of dubious security vulnerability, we have this report: I have found a security vulnerability in Windows that permits an attacker to run arbitrary code on a remote system. Prepare the...
View ArticleAn amusing story about a practical use of the null garbage collector
Some time ago, I noted that the null garbage collector is a valid garbage collector if the amount of RAM available to the runtime is greater than the total memory requirements of the program. This...
View ArticleHow does Task Manager choose the icon to show for a process?
When you view the list of Processes in Task Manager, each entry gets a little icon. Where does that icon come from? If the process has a visible window, then Task Manager uses the icon of the window....
View ArticleIf I call GetExitCodeThread for a thread that I know for sure has exited, why...
A customer reported that when they took the thread handle returned by the _beginthread function and passed it to GetExitCodeThread, the function reported that the thread was STILL_ACTIVE, even...
View Article