Showing tag results for Other

Jul 18, 2006
Post comments count0
Post likes count1

How are DLL functions exported in 32-bit Windows?

Raymond Chen

The designers of 32-bit Windows didn't have to worry quite so much about squeezing everything into 256KB of memory. Since modules in Win32 are based on demand-paging, all you have to do is map the entire image into memory and then run around accessing the parts you need. There is no distinction between resident and non-resident names; the names of ...

Other
Jul 13, 2006
Post comments count0
Post likes count0

Glass houses are great places to throw stones

Raymond Chen

Whenever I write an article explaining that programs should avoid doing X, I can confidently rely on a comment saying, "Well, Microsoft Product Q does this!" as if to say, "Gotcha, you hypocrite!" But they're saying "gotcha" to the wrong person. Because, and I'm sure it's a shock to many people to read this, I did not personally wr...

Other
Jul 12, 2006
Post comments count0
Post likes count0

Pidls and monikers do roughly the same thing, just backwards

Raymond Chen

When operating with the Windows shell, you will almost certainly find yourself at some point working with a pointer to an item ID list, known also as a "pidl" (rhymes with "middle"). On the other hand, when working with OLE you may find yourself having do deal with monikers. In a sense, they both do the same thing. They let you refer to some sort o...

Other
Jul 11, 2006
Post comments count0
Post likes count0

Not everybody with a non-Windows partition type is a geek

Raymond Chen

In the discussions following why Windows setup lays down a new boot sector, some commenters suggested that Windows setup could detect the presence of a non-Windows partition as a sign that the machine onto which the operating system is being installed belongs to a geek. In that way, the typical consumer would be spared from having to deal with a ...

Other
Jun 26, 2006
Post comments count0
Post likes count0

Look who bought my name

Raymond Chen

Commenter Pavel Vozenilek noticed that if you type my name into Google, there is only one sponsored link, and it's from Google themselves, inviting you to apply for a job there. (Maybe I should sue. Perhaps I can get a settlement.) When I mentioned this to some other people at Microsoft, they started hunting around to see what sort of ads cam...

Other
Jun 20, 2006
Post comments count0
Post likes count0

A single-instance program is its own denial of service

Raymond Chen

There are many ways a program can establish itself as a single-instance program; I won't go into them here. But once people head down the path of a single-instance program, they bump into another issue in their security review: Denial of service. We are using a named mutex with a fixed name in order to detect whether another copy of the program is...

Other
Jun 19, 2006
Post comments count0
Post likes count0

Why can't you programmatically reorder the items on the Start menu?

Raymond Chen

The classic Start menu and the "All Programs" portion of the Windows XP Start menu permit you to customize the order of the shortcuts that appear there. You can use drag/drop to rearrange them, or force them to be sorted by name. But why is there no programmatic interface to these actions? Because the power would be used for evil far more tha...

Other
Jun 16, 2006
Post comments count0
Post likes count0

Understanding what significant digits really mean

Raymond Chen

A double-precision floating point number carries fifteen significant digits. What does this really mean? I multiplied 0.619207 by 10,000,000 and got 6192069.999999991 instead of 6192070. That's only six significant digits; where's my fifteen? Talking about significant digits is really just a shorthand for talking about relative precision. "Fifte...

Other
Jun 13, 2006
Post comments count0
Post likes count0

Fumbling around in the dark and stumbling across the wrong solution

Raymond Chen

I don't mean to pick on this series of entries, but it illustrates an interesting pattern of stumbling across the wrong "solution". The series begins by attempting to trigger the system's monitor blank timeout by posting a message to the desktop window. As we saw earlier, the desktop window is a very special window and as a rule should be avoi...

Other
May 30, 2006
Post comments count0
Post likes count0

People are very sensitive to how the icons look

Raymond Chen

Windows XP shipped with new icons for many common items in the shell, and Windows Vista will have even more and newer icons. One of the things the designers have to be careful about with drawing these icons is to make sure they don't actually look like anything. Let me clarify. The folder icon, for example, is not based on any actual phy...

Other