The Old New Thing

See you in Building 109, Conference Room A

We saw some time ago that if somebody invites you to a meeting in Building 7, they are inviting you off campus to take a break from work. If somebody invites you to a meeting in Building 109, Conference Room A, they are inviting you to join them at the Azteca Mexican restaurant next door. Update: One of the members of the "...

In Windows, the directory is the application bundle

Aaargh! wonders why Windows doesn't just steal the concept of bundles from Apple and package up each application with all its libraries and everything else it needs into a single directory. This is such a great idea, it's been around since the early 1990's. It's just that Windows didn't give it a cute named like bundle. It just gave it the ...

How do I make a window remain visible even when the user selects Show Desktop?

A customer had this question: I'd like to know how to get a window to remain visible, even when the user has selected Show Desktop. Right now, when the user picks Show Desktop, the desktop appears and covers my window. Um, yeah, because that's the whole point of Show Desktop: To show the desktop and get rid of all those windows that are in ...
Comments are closed.0 0
Code

How do I create a right-aligned toolbar button?

I didn't think this was all that common a request, but it came in twice from two different customers, so I guess there are still people creating toolbars, and creating them with right-aligned buttons (even though it violates Windows user interface guidelines, though I can't find a citation right now). You may have noticed that the toolbar ...
Comments are closed.0 0
Code

How do I convert a UTF-8 string to UTF-16 while rejecting illegal sequences?

By default, when you ask Multi­Byte­To­Wide­Char to convert a UTF-8 string to UTF-16 that contains illegal sequences (such as overlong sequences), it will try to muddle through as best as it can. If you want it to treat illegal sequences as an error, pass the MB_ERR_INVALID_CHARS flag. The MSDN documentation on this subject ...
Comments are closed.0 0
Code

Sufficiently advanced magic is indistinguishable from technology

An informal tradition in a former group was that whenever somebody bought a new car, we all went out to lunch to celebrate, but the person with the new car had to be one of the drivers. During one of our new-car trips, the proud owner of the new car showed off its fancy features. "Check this out, this car has a voice-controlled radio: Radio, ...

Generally speaking, if your function fails, you should return a failure code

A customer requested assistance with their shell namespace extension, and the request worked its way to me for resolution. Unhandled exception at 0x76fab89c (shell32.dll) in explorer.exe: 0xC0000005: Access violation reading location 0x00000000. shell32.dll!CShellItem::_GetPropertyStoreWorker() + 0x44 bytes shell32.dll!CShellItem::...
Comments are closed.0 0
Code

PE resources must be 4-byte aligned, but that doesn't stop people from trying other alignments

Resources in PE-format files must be stored at offsets which are a multiple of four. This requirement is necessary for platforms which are sensitive to data alignment. That doesn't stop people from breaking the rules anyway. After all, it sort of works anyway, as long as you're careful. I mean, sure maybe if somebody running a non-x86 version...

Microspeak: The planned unplanned outage, and other operations jargon

The Operations group at Microsoft manage the servers which keep the company running. And they have their own jargon which is puzzling to those of us who don't spend all our days in a noisy server room. Unplanned Unplanned Outage Planned Unplanned Outage Immediate Deployment Timeframe. This one even has its own TLA: IDT. From what I can ...