Showing results for April 2012 - Page 2 of 3 - The Old New Thing

Apr 17, 2012
0
0

There's the kernel, and there's kernel mode – confusing historical terminology

Raymond Chen
Raymond Chen

A few weeks ago, I mentioned that the kernel folks decided not to expose bonus bytes to applications. Some people were confused by this statement, not for what it said, but for what it implied. "Wait, you're telling me that the heap is implemented in kernel mode?" Let's turn the clock back to 1983. The core components of Windows fell into three ...

Other
Apr 16, 2012
0
0

Why do we need IsDialogMessage at all?

Raymond Chen
Raymond Chen

alv wonders why we need the function at all. "All its activity could take place inside the window procedure of the modeless dialog itself", since when it doesn't have focus, it shouldn't be responding to messages anyway. Sure, that works great if the modeless dialog has focus. But it almost never does. What has focus is a control inside the mode...

Code
Apr 13, 2012
0
0

You already know the answer since you do it yourself

Raymond Chen
Raymond Chen

A customer was writing a program that performed virtual drag/drop. They were using the technique but found that many applications don't support drag/drop of virtual content. They support only . What's more, often these applications query for on not because they want to access the file, but just because they want to get the file names (for examp...

Code
Apr 10, 2012
0
0

Microspeak: scoped to

Raymond Chen
Raymond Chen

The Merriam-Webster dictionary gives as the meaning of scope as a verb to look at for evaluation, as in "to scope out the competition." But that's not how we use it at Microsoft. Here are some fake citations: The Widgets pop-up shows the available widgets scoped to the current selection. The results of the search are scoped to the current fold...

OtherMicrospeak
Apr 9, 2012
0
0

There's the interface contract, and there are the implementations of the interface contract

Raymond Chen
Raymond Chen

Ivo wants to know whether it is legal to use as the icon parameters to . The documentation says that the parameters are optional, but some shell folder implementations treat them as mandatory. Yes, the parameters are technically optional, but it's also the case that many people mess up their implementation of the interface and treat them as mand...

Code
Apr 6, 2012
0
0

Registration-free COM the old-fashioned way: The car mp3 player

Raymond Chen
Raymond Chen

Windows XP introduced Registration-Free COM, permitting you to place your COM object registrations in a manifest rather than in the registry. Very handy when you want to support xcopy deployment or running directly off a thumb drive. And very much in keeping with the principle of not using a global solution for a local problem. (If you need y...

Code
Apr 5, 2012
0
0

You can use an OVERLAPPED structure with synchronous I/O, too

Raymond Chen
Raymond Chen

Even if you didn't open a file with , you can still use the structure when you issue reads and writes. Mind you, the I/O will still complete synchronously, but you can take advantage of the other stuff that has to offer. Specifically, you can take advantage of the and members to issue the I/O against a file location different from the curren...

Code
Apr 4, 2012
0
0

I totally presented to an executive the wrong way

Raymond Chen
Raymond Chen

Some time ago, Gray Knowlton wrote an article on how to present to an executive. As you might have guessed, I've done it completely the wrong way. Many years ago, I was part of a group presenting to a senior-level executive. I was the one who wrote the document establishing the background for the topic and laying out the various options with t...

Other