Showing results for 2004 - Page 45 of 45 - The Old New Thing

Jan 9, 2004
0
1

Why do member functions need to be "static" to be used as a callback?

Raymond Chen
Raymond Chen

As we learned yesterday, nonstatic member functions take a secret "this" parameter, which makes them incompatible with the function signature required by Win32 callbacks. Fortunately, nearly all callbacks provide some way of providing context. You can shove the "this" pointer into the context so you can reconstruct the source object. Here's an ex...

History
Jan 8, 2004
0
0

It's called "proofreading", give it a shot why don't you

Raymond Chen
Raymond Chen

Like everybody else, I was checking out the new MSN home page and I clicked over to the tour. And right there as their top headline in the sample web page, it says, "Wierd items of the future". Ahem. It's spelled w-e-i-r-d. And on all of the MSN properties, like local city guides, you can see MSN's new motto: "More Useful Everyday". Um, another spe...

Other
Jan 8, 2004
0
0

Budget cuts strike Swedish radio

Raymond Chen
Raymond Chen

Alas, budget cuts over at Sveriges Radio have reduced the staff of Klartext, the Swedish news program presented in easy Swedish, from three to two, so they won't be able to provide text summaries of the radio show. I had been using the summaries to help me fill in the gaps I had missed, but now I guess I'll just have to listen even more closely. I...

Other
Jan 8, 2004
0
4

The history of calling conventions, part 3

Raymond Chen
Raymond Chen

Okay, here we go: The 32-bit x86 calling conventions. (By the way, in case people didn't get it: I'm only talking in the context of calling conventions you're likely to encounter when doing Windows programming or which are used by Microsoft compilers. I do not intend to cover calling conventions for other operating systems or that are specific to a...

History
Jan 7, 2004
0
0

Words I'd like to ban in 2004

Raymond Chen
Raymond Chen

It seems to be fashionable to do a "top words" list this time of year. We have Google 2003 Zeitgeist, Top Yahoo! Searches 2003, Merriam-Webster's Words of the Year for 2003, YourDictionary.com's Top Ten Words of 2003, Lake Superior State University's Banished Words List for 2004; still waiting for the American Dialect Society's choice for Word of ...

OtherMicrospeak
Jan 7, 2004
0
2

The history of calling conventions, part 2

Raymond Chen
Raymond Chen

Foreshadowing: This information will actually be useful in a future discussion. Well, not the fine details, but you may notice something that explains... um... it's hard to describe. Just wait for it. Curiously, it is only the 8086 and x86 platforms that have multiple calling conventions. All the others have only one! Now we're going deep into t...

History
Jan 2, 2004
0
2

The history of calling conventions, part 1

Raymond Chen
Raymond Chen

The great thing about calling conventions on the x86 platform is that there are so many to choose from! In the 16-bit world, part of the calling convention was fixed by the instruction set: The BP register defaults to the SS selector, whereas the other registers default to the DS selector. So the BP register was necessarily the register used for a...

History
Jan 1, 2004
0
0

Don't trust the return address

Raymond Chen
Raymond Chen

Sometimes people ask, "So I know how to get my return address [use the _ReturnAddress() intrinsic]; how do I figure out what DLL that return address belongs to?" Beware. Even if you figure out which DLL the return address belongs to [use Get­Module­Handle­Ex(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS)], that doesn't mean that that is a...

Code