Quantcast
Channel: The Old New Thing
Browsing all 3085 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

The challenges in changing the way Explorer hosts shell extensions

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

View Article


Image may be NSFW.
Clik here to view.

Fontography term or pretentious blather?

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

View Article


Image may be NSFW.
Clik here to view.

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

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

View Article

Image may be NSFW.
Clik here to view.

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

A customer asked for help installing a particular DLL. They ran the command regsvr /i SomeDll.dll but got the error "SomeDll.dll was loaded, but the DllInstall entry point was not found. This file can...

View Article

Image may be NSFW.
Clik here to view.

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

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 Exit­Process to force Internet Explorer to...

View Article


Image may be NSFW.
Clik here to view.

Why not use animated GIFs as a lightweight alternative to AVIs in the...

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

View Article

Image may be NSFW.
Clik here to view.

The Control Panel search results understand common misspellings, too

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

View Article

Image may be NSFW.
Clik here to view.

It is not unreasonable to expect uninitialized garbage to change at any time,...

A customer admitted that they had a bug in their code: #define UNICODE #define _UNICODE #include <windows.h> // error checking removed for expository purposes // code that writes out the data...

View Article


Image may be NSFW.
Clik here to view.

How can I extend the deadline for responding to the PBT_APMSUSPEND message?

A customer observed that starting in Windows Vista, the deadline for responding to the PBT_APMSUSPEND message was reduced from twenty seconds to two seconds. Their program needs more than two seconds...

View Article


Image may be NSFW.
Clik here to view.

How to insert a large number of items into a treeview efficiently

Just a quick tip today. If you need to insert a large number of items into a treeview, like tens of thousands, then it's much more efficient to insert them "backwards". (I'm ignoring for now the...

View Article

Image may be NSFW.
Clik here to view.

Why is CLIPFORMAT defined to be a WORD rather than a UINT?

Commenter Ivo wants to know if the Register­Clipboard­Format function returns a UINT, why is the CLIP­FORMAT data type defined to be a WORD? Since a WORD is smaller than a UINT, you have to stick in a...

View Article

Image may be NSFW.
Clik here to view.

Things I've written that have amused other people, Episode 8

In a technical discussion, I opened a reply with Bob's paper which I haven't yet read points out that... Some people wrote to me to say that the've added this quote to their file in the hopes of being...

View Article

Image may be NSFW.
Clik here to view.

If you protect a write with a critical section, you may also want to protect...

It is common to have a critical section which protects against concurrent writes to a variable or collection of variables. But if you protect a write with a critical section, you may also want to...

View Article


Image may be NSFW.
Clik here to view.

Our code needs to run on multiple platforms with different rules, so we...

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

View Article

Image may be NSFW.
Clik here to view.

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

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

View Article


Image may be NSFW.
Clik here to view.

Why does my program still show up in the Programs and Features folder after...

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

View Article

Image may be NSFW.
Clik here to view.

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

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

View Article


Image may be NSFW.
Clik here to view.

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

The function Enum­Claw, 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 Enum­Claw:...

View Article

Image may be NSFW.
Clik here to view.

What does it mean when my program exits with the message "This application...

You're running your program, and then it suddenly exits with the message This application has requested the Runtime to terminate it in an unusual way. What happened? That message is printed by the C...

View Article

Image may be NSFW.
Clik here to view.

Sure, I'm supposed to pass WT_EXECUTELONGFUNCTION if my function takes a long...

A customer contacted me to tell a story and ask a question. The customer discovered that in their code base, all calls to Queue­User­Work­Item passed the WT_EXECUTE­LONG­FUNCTION flag, regardless of...

View Article
Browsing all 3085 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>