Showing tag results for History

Oct 19, 2004
Post comments count0
Post likes count1

The compatibility constraints of even your internal bookkeeping

Raymond Chen

The Listview control when placed in report mode has a child header control which it uses to display column header titles. This header control is the property of the listview, but the listview is kind enough to let you retrieve the handle to that header control. And some programs abuse that kindness. It so happens that the original listview...

History
Oct 11, 2004
Post comments count0
Post likes count2

What’s the atom returned by RegisterClass useful for?

Raymond Chen

The and functions return an What is that good for? The names of all registered window classes is kept in an atom table internal to USER32. The value returned by the class registration functions is that atom. You can also retrieve the atom for a window class by asking a window of that class for its class atom via . The atom can be convert...

History
Oct 8, 2004
Post comments count0
Post likes count1

Why is there a separate GetSystemDirectory function?

Raymond Chen

If the system directory is always , why is there a special function to get it? Because it wasn't always that. For 16-bit programs on Windows NT, the system directory is . That's also the name of the system directory for Windows 95-based systems and all the 16-bit versions of Windows. But even in the 16-bit world, if it was always...

History
Oct 5, 2004
Post comments count0
Post likes count1

The macros for declaring and implementing COM interfaces

Raymond Chen

There are two ways of declaring COM interfaces, the hard way and the easy way. The easy way is to use an IDL file and let the MIDL compiler generate your COM interface for you. If you let MIDL do the work, then you also get __uuidof support at no extra charge, which is a very nice bonus. The hard way is to do it all by hand. If you choose th...

History
Sep 10, 2004
Post comments count0
Post likes count2

Sometimes the bug isn’t apparent until late in the game

Raymond Chen

I didn't debug it personally, but I know the people who did. During Windows XP development, a bug arrived on a computer game that crashed only after you got to one of the higher levels. After many saved and restored games, the problem was finally identified. The program does its video work in an offscreen buffer and transfers it to the sc...

History
Sep 2, 2004
Post comments count0
Post likes count1

Why does Windows keep your BIOS clock on local time?

Raymond Chen

Even though Windows NT uses UTC internally, the BIOS clock stays on local time. Why is that? There are a few reasons. One is a chain of backwards compatibility. In the early days, people often dual-booted between Windows NT and MS-DOS/Windows 3.1. MS-DOS and Windows 3.1 operate on local time, so Windows NT followed sui...

History
Aug 30, 2004
Post comments count0
Post likes count1

Importance of alignment even on x86 machines, part 2

Raymond Chen

The various Interlocked functions (InterlockedIncrement, and so on) require that the variable being updated be properly aligned, even on x86, a platform where the CPU silently fixes unaligned memory access invisibly. If you pass an unaligned pointer to one of the Interlocked functions, the operation will still succeed, but the result won't be ato...

History
Aug 27, 2004
Post comments count0
Post likes count2

Importance of alignment even on x86 machines

Raymond Chen

Sometimes unaligned memory access will hang the machine. Some video cards do not let you access all the video memory at one go. Instead, you are given a window into which you can select which subset of video memory ("bank") you want to see. For example, the EGA video card had 256K of memory, split into four 64K banks. If you wanted to access memo...

History
Aug 23, 2004
Post comments count0
Post likes count1

The kooky STRRET structure

Raymond Chen

It was designed when computers were a lot slower.

History