There is no /8TB flag on 64-bit Windows
A customer reported that their 64-bit application was crashing on Windows 8.1. They traced the problem back to the fact that the user-mode address space for 64-bit applications on Windows 8.1 is...
View ArticleHow can I reposition my controls so they aren't covered by the touch keyboard?
Last week, we saw how to tell the Windows 8 touch keyboard to appear automatically in a desktop program when focus enters an edit control. But we did nothing to prevent the touch keyboard from...
View ArticleBitter or acerbic? or does it make a difference?
One of my colleagues told me that my name came up in conversation, and somebody said that they thought I had a reputation for being bitter. My colleague defended me. "Nah, Raymond isn't bitter. He's,...
View ArticleTaking ownership of a file doesn't give you access, yet
A colleague of mine accidentally ran a command from an elevated command prompt rather than a normal unelevated command prompt. By default, files created from an elevated command prompt are owned by...
View ArticleKeep your eye on the code page: Is this string CP_ACP or UTF-8?
A customer had a problem with strings and code pages. The customer has a password like "Müllwagen" for a particular user. Note the umlaut over the u. That character is encoded as the two bytes C3 BC...
View ArticleHow can I force a CreateFile call to hang, in order to test something?
A customer was doing some testing and wanted to know if there was a way to force a call to CreateÂFile to hang, so that they can test their program's hang detection and recovery code. You can ceate...
View ArticleHow can I reposition my window so it isn't covered by the touch keyboard?
Last week, we saw how we could rearrange our window contents to avoid having the touch keyboard cover the edit control. But what if the touch keyboard covers the entire window? No amount of...
View ArticleOne way to make sure nobody reports problems with your Web site
I had ordered a service online, and the Web site said, "Do not close this window until you are done, because once you close the window, you won't be able to come back." Okay, fine. I just need to make...
View ArticleWhen you think you found a problem with a function, make sure you're actually...
On an internal mailing list, a tester asked if there were any known problems with the FindÂFirstÂFileÂEx function preventing a directory from being deleted and recreated. Our code creates a test...
View ArticleHow come the technique for launching an unelevated process from an elevated...
A customer was following the Execute in Explorer sample to launch an unelevated process from an elevated process. (A sample which I rehashed some time ago.) The customer reported that the resulting...
View ArticleWhy does the class name for Explorer change depending on whether you open it...
I noted some time ago that Explorer's original name was Cabinet, and that the name lingers in the programmatic class name: CabinetÂWClass. A commenter with a rude name points out that Explorer uses...
View ArticleRandom links on taking better pictures
I'm always interested in finding simple things you can do to take better pictures. Here are some links I've collected. Take better pictures of friends and family: Turn off your flash. Ten tips for...
View ArticleReinterpreting the bits of a 64-bit integer as if they were a...
Today's Little Program takes a 64-bit integer and reinterprets its physical representation as a double-precision floating point number. using System; class Program { static double...
View ArticleSorry for the interruption, but it doesn't happen often
Many years ago, my feature manager and I were called into the project leader's office for some reason or other, I forget exactly what. We were about five minutes into the meeting when the project...
View ArticleA trick for finding the correct internal mailing list
Suppose you have a problem and you want to report it to an internal mailing list, but you don't know the correct mailing list to use. Here's a trick that apparently is not that well-known, though...
View ArticleWhere is the full version of the music that plays when you start Windows 98...
A customer was presumably exercising the unlimited support part of their support contract when they asked, "Where is the full song for the music that plays when you start Windows 98 for the first...
View ArticleWindows 95 and Windows NT manage the TEB on x86 differently
Today, a historical note of no consequence. Just a story. The Win32 x86 ABI specifies that the FS register holds a selector which is based at the current thread's TEB. In other words, fs:[n] is the...
View ArticleParsing a string as a 64-bit integer, somehow
Today's Little Program takes a string and tries to parse it as a 64-bit integer in formats that a programmer would likely encounter. Here's a first stab: using System; using System.Globalization;...
View ArticleMicrospeak: Stretch goal
Recall that Microspeak is not merely for jargon exclusive to Microsoft, but also for jargon that you need to know. A project will set some goals, which are things it intends to accomplish. It may also...
View Article2015 mid-year link clearance
The semi-annual link clearance is here! Windows 8 comes with a data compression API. I was going to write a Little Program to demonstrate it, but it turns out the MSDN sample pretty much covers it, so...
View Article