Showing archive results for December 2011

Dec 7, 2011
Post comments count0
Post likes count0

GetParent, just as confusing as EnumClaw, but it's an actual function!

Raymond Chen
Raymond Chen

The function , documented as returning "the child or the parent of the window", was a joke, but there's a function whose behavior is just as confusing as the joke function : . The function returns the parent window, or owner window, or possibly neither. All that's left is for it to be a floor wax and it'll have everything covered. The idea behi...

Code
Dec 6, 2011
Post comments count0
Post likes count0

A feature I didn't even know existed much less had a name: Color hot-track

Raymond Chen
Raymond Chen

I hadn't even noticed this until somebody pointed it out: When you hover your mouse over a button in the Windows 7 taskbar which corresponds to a running application, the taskbar button lights up in a color that matches the colors in the icon itself. (And even more subtly, the lighting effect is centered on the mouse.) This feature even has ...

Tips/Support
Dec 5, 2011
Post comments count0
Post likes count0

Why does my program still show up in the Programs and Features folder after my uninstaller exits?

Raymond Chen
Raymond Chen

A customer reported that they were having problems with their program entry in the Programs and Features folder (formerly known as Add and Remove Programs, formerly known as Add/Remove Programs). When the user goes to the Programs and Features folder, selects their program, and clicks Uninstall, the uninstaller runs, but after the uninstaller exits...

Code
Dec 2, 2011
Post comments count0
Post likes count0

Don't let more than one process try to read from stdin at the same time

Raymond Chen
Raymond Chen

A customer reported a problem with a program that ran a series of other programs in parallel. We have a main program (call it main.exe) that runs a bunch of child processes with stdout and stderr redirected. (We are not redirecting stdin.) We've found that some of the child processes get stuck inside the C runtime startup code on a call to on the...

Code
Dec 1, 2011
Post comments count0
Post likes count0

Our code needs to run on multiple platforms with different rules, so we follow none of them!

Raymond Chen
Raymond Chen

A customer was encountering sporadic crashes in their 64-bit application, and upon investigation, the problem was traced to a misaligned RSP register. We saw some time ago that the Windows x64 calling convention requires the RSP register to be 16-byte aligned. The customer traced the source of the misalignment to a third-party library they were ...

Other