Showing results for June 2011 - Page 2 of 3 - The Old New Thing

Jun 21, 2011
0
0

See you in Building 109, Conference Room A

Raymond Chen
Raymond Chen

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 "Build...

Other
Jun 20, 2011
0
0

In Windows, the directory is the application bundle

Raymond Chen
Raymond Chen

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 boring...

Other
Jun 17, 2011
0
0

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

Raymond Chen
Raymond Chen

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 the w...

Code
Jun 16, 2011
0
0

How do I create a right-aligned toolbar button?

Raymond Chen
Raymond Chen

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 common c...

Code
Jun 15, 2011
0
0

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

Raymond Chen
Raymond Chen

By default, when you ask 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 flag. The MSDN documentation on this subject is, to be honest, kind of hard to follow and even includes a doub...

Code
Jun 14, 2011
0
0

Sufficiently advanced magic is indistinguishable from technology

Raymond Chen
Raymond Chen

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, On." ...

Non-Computer
Jun 13, 2011
0
0

You don't need to steal focus if you can just arrange for someone to give it to you

Raymond Chen
Raymond Chen

Commenter doesn't matter proposes a scenario where focus-stealing is necessary: There are two applications A and B, Application B exposes an interface, and Application A connects to application B via that interface, When some sort of even occurs in application B, it notifies application A, which wants to steal fo...

Code
Jun 10, 2011
0
0

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

Raymond Chen
Raymond Chen

A customer requested assistance with their shell namespace extension, and the request worked its way to me for resolution. The customer was at a loss because the customer's code was nowhere on the stack. What is wrong? The customer didn't provide a dump file or any other information beyond the stack trace. (Hint: When reporting a problem with...

Code
Jun 9, 2011
0
0

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

Raymond Chen
Raymond Chen

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 of W...

Other
Jun 8, 2011
0
0

Microspeak: The planned unplanned outage, and other operations jargon

Raymond Chen
Raymond Chen

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. From what I can gather, an Unplanned Outage would be better termed an Unscheduled Outage: We did not have it marked off on our calendar that the ...

OtherMicrospeak