Why do I sometimes get classic buttons and sometimes themed buttons depending...
A customer reported that their printer configuration property sheet page looked different depending on the host process. In some processes, the printer configuration dialog had the classic look of...
View ArticleWhy do BackupRead and BackupWrite require synchronous file handles?
The BackupRead and BackupWrite functions require that the handle you provide by synchronous. (In other words, that they not be opened with FILE_FLAG_OVERLAPPED.) A customer submitted the following...
View ArticleWhat is the proper handling of WM_RENDERFORMAT and WM_RENDERALLFORMATS?
Jeremy points out that the documentation for SetClipboardData says that the clipboard owner must not call OpenClipboard when responding to the WM_RENDERFORMAT and WM_RENDERALLFORMATS messages....
View ArticleMiss Denmark, she is dressed as a mermaid because we couldn't secure the...
Once again, the commentary is NSFW, but once again, they so deserve it. Miss Universe 2012 National Costumes, Part 1 my favorite is the commentary for the Dominican Republic) Miss Universe 2012...
View ArticleYou too can use your psychic powers: Spaces in paths
I'm going to be lazy today and make you solve the problem. Did a recent security hotfix change change the way we handle UNC paths with spaces? Normally, if we open the Run dialog and type...
View ArticleA question about endian-ness turns out to be the wrong question
Via a customer liaison, we received what seemed like a simple question: "How can I detect whether a Windows machine is big-endian or little-endian?" You could actually answer this question (say by...
View ArticleWhat celebration of Kwanzaa would be complete without Sandra Lee's infamous...
For those unfamiliar with Sandra Lee, her gimmick is that the ingredients in her recipes are primarily prepared foods, a food-preparation technique (I'm reluctant to call it cooking) which she calls...
View ArticleWhat is so special about the instance handle 0x10000000?
A customer wanted to know what it means when the LoadLibrary function returns the special value 0x10000000. Um, it means that the library was loaded at 0x10000000? Okay, here's some more information:...
View ArticleWhat do HeapLock and HeapUnlock do, and when do I need to call them?
You never need to call the HeapLock and HeapUnlock functions under normal operation. Assuming the heap is serialized (which is the default), all the standard heap functions like HeapAllocate and...
View ArticleWhy can't you rename deleted items in the Recycle Bin?
I misread a question from commenter Comedy Gaz, so let's try it again. (Good thing I held one last Suggestion Box Monday of the year in reserve.) Why can't you rename deleted items in the Recycle Bin?...
View Article2012 year-end link clearance
Another round of the semi-annual link clearance. SnarkNew! Improved! Shape Up Your Life!: The New York Times book review of Timothy Ferriss's The 4-Hour Body reads like a recap on Television Without...
View ArticleIf NTFS is a robust journaling file system, why do you have to be careful...
Some time ago, I noted that in order to format a USB drive as NTFS, you have to promise to go through the removal dialog. But wait, NTFS is a journaling file system. The whole point of a journaling...
View ArticleA few stray notes on Windows patching and hot patching
Miscellaneous notes, largely unorganized. A lot of people questioned the specific choice of MOV EDI, EDI as the two-byte NOP, with many people suggesting alternatives. The decision to use MOV EDI, EDI...
View ArticleWhy does my program run really slow or even crash (or stop crashing, or crash...
More than once, a customer has noticed that running the exact same program under the debugger rather than standalone causes it to change behavior. And not just in the "oh, the timing of various...
View ArticleWhat's the guidance on when to use rundll32? Easy: Don't use it
Occasionally, a customer will ask, "What is Rundll32.exe and when should I use it instead of just writing a standalone exe?" The guidance is very simple: Don't use rundll32. Just write your standalone...
View ArticleUnderstanding the classical model for linking, groundwork: The algorithm
The classical model for linking goes like this: Each OBJ file contains two lists of symbols. Provided symbols: These are symbols the OBJ contains definitions for. Needed symbols: These are symbols the...
View ArticleUnderstanding the classical model for linking: Taking symbols along for the ride
Last time, we learned the basics of the classical model for linking. Today, we'll look at the historical background for that model, and how the model is exploited by libraries. In the classical model,...
View ArticleUnderstanding the classical model for linking: You can override an LIB with...
If you study the classical model for linking, you'll see that OBJ files provided directly to the linker have a special property: They are added to the module even if nobody requests a symbol from...
View ArticleThe enduring cultural fascination with Queen's Bohemian Rhapsody
Bohemian Rhapsody was not part of my world growing up, so I view the continuing cultural fascination with the piece with detached confusion. The Bohemian Rhapsody Project, a movie which takes its...
View ArticleUnderstanding the classical model for linking: Sometimes you don't want a...
Continuing our study of the classical model for linking, let's take another look at the trick of taking symbols along for the ride. The technique of taking symbols along for the ride is quite handy if...
View Article