Showing tag results for History

Jan 23, 2004
Post comments count0
Post likes count0

The white flash

Raymond Chen
Raymond Chen

If you had a program that didn't process messages for a while, but it needed to be painted for whatever reason (say, somebody uncovered it), Windows would eventually lose patience with you and paint your window white. Or at least, that's what people would claim. Actually, Windows is painting your window with your class background brush. Since most...

History
Jan 14, 2004
Post comments count0
Post likes count2

The history of calling conventions, part 5: amd64

Raymond Chen
Raymond Chen

The last architecture I'm going to cover in this series is the AMD64 architecture (also known as x86-64). The AMD64 takes the traditional x86 and expands the registers to 64 bits, naming them rax, rbx, etc. It also adds eight more general purpose registers, named simply R8 through R15. Here's a sample: On entry to CallThatFunction, the stack lo...

History
Jan 9, 2004
Post comments count0
Post likes count1

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
Post comments count0
Post likes count4

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
Post comments count0
Post likes count2

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
Post comments count0
Post likes count2

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
Dec 24, 2003
Post comments count0
Post likes count1

Why not just block the apps that rely on undocumented behavior?

Raymond Chen
Raymond Chen

Because every app that gets blocked is another reason for people not to upgrade to the next version of Windows. Look at all these programs that would have stopped working when you upgraded from Windows 3.0 to Windows 3.1. Actually, this list is only partial. Many times, the compatibility fix is made inside the core component for all programs rath...

History