Showing archive results for 2004

Feb 5, 2004
Post comments count0
Post likes count2

The layout of a COM object

Raymond Chen

The Win32 COM calling convention specifies the layout of the virtual method table (vtable) of an object. If a language/compiler wants to support COM, it must lay out its object in the specified manner so other components can use it. It is no coincidence that the Win32 COM object layout matches closely the C++ object layout. Even though COM was o...

History
Feb 4, 2004
Post comments count0
Post likes count0

Answers to exercises – mismatching new/delete

Raymond Chen

Answers to yesterday's exercises: What happens if you allocate with scalar "new" and free with vector "delete[]"? The scalar "new" will allocate a single object with no hidden counter. The vector "delete[]" will look for the hidden counter, which isn't there, so it will either crash (accessing nonexistent memory) or grab a random number and a...

Code
Feb 4, 2004
Post comments count0
Post likes count0

The Glass Engine and Ishkur's Guide to Electronic Music

Raymond Chen

The Glass Engine is an interactive guide to the music of Philip Glass, organized by... um... at least they're organized. By something. Bizarre yet oddly compelling. (Perhaps if we ask nicely, we can get Marc Miller to tell the story of the time he actually met Philip Glass...) In a similar vein, a friend of mine directed me to Ishkur's Guide to Ele...

Non-Computer
Feb 3, 2004
Post comments count0
Post likes count0

Mismatching scalar and vector new and delete

Raymond Chen

In a previous entry I alluded to the problems that can occur if you mismatch scalar "new" with vector "delete[]" or vice versa. There is a nice description of C++ memory management in C++ Gotchas: Avoiding Common Problems in Coding and Design on www.informit.com, and I encourage you to read at least the section titled Failure to Distinguish Sca...

Code
Feb 2, 2004
Post comments count0
Post likes count0

What goes wrong when you add "Copy To" to the context menu

Raymond Chen

Lockergnome tipped people off to this page which talks (among other things) about adding "Copy To" to the context menu. I considered adding this tweak to Tweak UI but ultimately decided against. Here's why: The "Copy to Folder" and "Move to Folder" options weren't designed to be on the context menu. They were only meant to be placed in Explorer's...

Tips/Support
Jan 31, 2004
Post comments count0
Post likes count0

"Section 419" scammers arrested in Netherlands; Danish flag flies proudly

Raymond Chen

Dutch police have arrested 52 people suspected of defrauding gullible Internet users in one of the largest busts of the infamous "Nigerian e-mail" scam. Hooray for the Dutch police. Their next target: Web sites that illustrate a Dutch article with the Danish flag. (I must sheepishly admit that I too mistakenly identified the home of Ikea as Denmark...

Non-Computer
Jan 30, 2004
Post comments count0
Post likes count0

How do we decide what features make it into a product?

Raymond Chen

David Lemson has an excellent article titled How do we decide what features make it into Exchange?. Although he's talking about Exchange specifically, the general principles apply to many products.

Other
Jan 29, 2004
Post comments count0
Post likes count0

Ikea walk-through

Raymond Chen

Jeff Davis tipped me off to this Ikea walk-through. Frustratingly, the walkthrough doesn't include any cheat codes. Even though Ikea was founded by a Swede, its company colors match the Swedish national colors, all its product names are Swedish, and it is clearly associated with Sweden in the minds of everyone, it is in fact headquartered in Denm...

Non-Computer