Showing archive results for 2011

Nov 23, 2011
Post comments count0
Post likes count1

It is not unreasonable to expect uninitialized garbage to change at any time, you don't need to ask for an explanation

Raymond Chen

A customer admitted that they had a bug in their code: One bug in the above code is in the final parameter passed to : It's supposed to be the count in bytes, but the calculation appends only one byte for the terminating null instead of a full . In other words, it should be For concreteness, let's say the original string was five s in length,...

Code
Nov 22, 2011
Post comments count0
Post likes count1

The Control Panel search results understand common misspellings, too

Raymond Chen

Here's a little trick. Open your Start menu and type scrensaver into the search box. That's right, spell it with only one e. Hey, it still found the Control Panel options for managing your screen saver. If you enable Improve my search results by using online Help in Windows Help and Support, this sends your search query to a back-end server to se...

Other
Nov 21, 2011
Post comments count0
Post likes count1

Why not use animated GIFs as a lightweight alternative to AVIs in the animation common control?

Raymond Chen

Commenter Vilx- wondered why animated GIFs weren't used as the animation format for the shell animation common control. After all, "they are even more lightweight than AVIs." Animated GIFs are certainly more lightweight than general AVIs, since AVI is just a container format, so decoding a general AVI means decoding any encoding format invented n...

History
Nov 18, 2011
Post comments count0
Post likes count1

Why does Internet Explorer not call DLL_PROCESS_DETACH on my DLL when I call ExitProcess?

Raymond Chen

A customer asked a question, but as is often the case, the question was much more telling than the answer. We have an Internet Explorer plug-in which calls to force Internet Explorer to exit. We found that when we do this, our plug-in does not receive a notification. What could be preventing our plug-in from receiving the notification? As w...

Code
Nov 17, 2011
Post comments count0
Post likes count1

Why can't I install this DLL via Regsvr32 /i?

Raymond Chen

A customer asked for help installing a particular DLL. They ran the command but got the error "SomeDll.dll was loaded, but the DllInstall entry point was not found. This file can not be registered." A DLL needs to be specifically written to be used with the command. You can't just grab some random DLL and expect to work. As we saw last week, t...

Other
Nov 16, 2011
Post comments count0
Post likes count1

How can I tell whether a COM pointer to a remote object is still valid?

Raymond Chen

A customer asked the rather suspicious question, "How do I check whether a pointer is valid in another process?" This question should make your head boggle with bewilderment. First of all, we've moved beyond to . Second of all, what the heck are you doing with a pointer in another process? You can't do anything with it! After some back-and-fort...

Code
Nov 15, 2011
Post comments count0
Post likes count0

Fontography term or pretentious blather?

Raymond Chen

Fontography is like wine. The connoisseurs speak in a language that only superficially resembles English. Here's a list of words. Which of them are terms used in fontography, and which are just pretentious blather? If you aren't familiar with font speak, here's a sample I stole from an old article on the evolution of the Internet explorer logo...

Other
Nov 14, 2011
Post comments count0
Post likes count1

The challenges in changing the way Explorer hosts shell extensions

Raymond Chen

Various types of shell extensions such as thumbnail extractors are run in a separate process, and if one of those shell extensions crashes, it takes out the COM Surrogate rather than the main Explorer process. Anonymous wondered if this model could be extended to all types of shell extensions, perhaps not all at once, but gradually. The dangers...

Other
Nov 11, 2011
Post comments count0
Post likes count1

Stupid Raymond talent: Screaming carrier

Raymond Chen

Similar to Mike, I was able to scream (not whistle: scream) a 300 baud carrier tone. This skill proved useful when I was in college and the mainframe system was down. Instead of sitting around waiting for the system to come back, I just went about my regular business around campus. Every so often, I would go to a nearby campus phone (like a free p...

Non-Computer
Nov 10, 2011
Post comments count0
Post likes count1

How can I tell whether a DLL has been registered?

Raymond Chen

A customer pointed out that you can use to register a DLL or to unregister it, but how do you query whether a DLL has been registered? DLL registration (via ) is not declarative; it is procedural. A DLL does not provide a manifest of things it would like to happen when installed. Instead, the DLL merely provides two functions for to call, one fo...

Other