Distinguishing between asking for help with a product and asking for help...
Internally at Microsoft, we have a programmer's tool which I will call Program Q. On the peer-to-peer mailing list for Program Q, somebody asked the following question: What's the best way to look at...
View ArticleIf there is no 16-bit emulation layer in 64-bit Windows, how come certain...
Troy Martin is puzzled by the remark in this knowledge base article that says No 16-bit code can run, except for recognized InstallShield and Acme installers (these are hard-coded in Wow64 to allow...
View ArticleOn the various ways of getting the current time and date in Win32
There are a number of functions in Win32 that obtain the current date and time. Here's how they fit together: The starting point is GetSystemTimeAsFileTime. This returns the current time in UTC...
View ArticleManipulating the zone identifier to specify where a file was download from
When you download a file via Internet Explorer, the file is tagged with a little bit of information known as a zone identifier which remembers where the file was downloaded from. This is what tells...
View ArticleThe complexity of modern voting, or at least modern dream voting
I dreamed that I arrived at my polling station just before it closed, but the ballot was not what I expected. Instead of voting on political candidates or referenda, I was voting on music from the...
View ArticleWhat is the point of FreeLibraryAndExitThread?
The FreeLibraryAndExitThread function seems pointless. I mean, all the function does is DECLSPEC_NORETURN void WINAPI FreeLibraryAndExitThread( HMODULE hLibModule, DWORD dwExitCode) {...
View ArticleCoUninitalize will ask a DLL if it is okay to unload now, but the answer is a...
The DllCanUnloadNow entry point is exported by COM in-proc servers. COM host applications call CoFreeUnusedLibraries periodically to ask COM to do DLL housecleaning, and in response, COM asks...
View ArticlePartially eliminating the need for SetThreadpoolCallbackLibrary and reducing...
The documentation for the SetThreadpoolCallbackLibrary says This prevents a deadlock from occurring when one thread in DllMain is waiting for the callback to end, and another thread that is...
View ArticleWhat's the point of the various ...WhenCallbackReturns functions?
The thread pool provides a number of functions named ...WhenCallbackReturns. What's the point of all these functions? Why can't you just do the operation yourself immediately before returning? We...
View ArticleHow did Raymond discover his carrier-screaming talent? And his homemade...
George wonders, "I am curious how Raymond found about his talent. Maybe it will be an interesting post." This isn't like a superhero who discovers as a young adult that he has powers beyond that of...
View ArticleMicrospeak: Spinning up or kicking off a build
Remember, Microspeak is not merely for jargon exclusive to Microsoft. It's jargon you can employ to sound more like an insider. Most of the time, a fresh build of Windows is produced every day. When...
View ArticleA possibly unbeatable record for the shortest amount of time between an email...
I occasionally bring up the issue of people who ask a question and then repeat the question, especially people who repeat the question with some impatience. At the time, the record for the shortest...
View ArticleWhy is my FormatMessage call crashing trying to read my insertion parameter?
A customer was looking for assistance in debugging a crash in their product. The stack trace looked like this: ntdll!_woutput_l+0x356 ntdll!_vsnwprintf_l+0x81 ntdll!_vsnwprintf+0x11...
View ArticleRestoring symbols to a stack trace originally generated without symbols
Has this ever happened to you? litware!Ordinal3+0x6042 litware!DllInstall+0x4c90 litware!DllInstall+0x4b9e contoso!DllGetClassObject+0x93c3 contoso!DllGetClassObject+0x97a9...
View ArticleHow can I launch an unelevated process from my elevated process and vice versa?
Going from an unelevated process to an elevated process is easy. You can run a process with elevation by passing the runas verb to ShellExecute or ShellExecuteEx. Going the other way is trickier....
View ArticleMy friend lived in a tiny house with an enormous garage
One evening, I had a series of three dreams. In each one, I visited an unusual home. In the first dream, I visited the home of a friend of mine. But instead of living in his condominium in the city,...
View ArticleWhy is the Program Files directory called Program Files instead of just...
Some people suggest that one thing Microsoft Research could do with that time machine they're working on is to go back in time and change the name of the Program Files directory to simply Programs....
View ArticleWhy don't all of my documents show up when I arrange my Documents library by...
A customer reported that when they opened their Documents library on Windows 7, some files were missing if they selected Arrange by: Name or Arrange by: Author or in fact any arrangement other than...
View ArticleHow do I get the path to the default user's profile?
A customer wanted to know how to get the path to the default user's profile. On older versions of Windows, the default location of the default user's profile was C:\WINNT\Profiles\Default. Then it...
View Article