Showing tag results for History

Dec 20, 2004
Post comments count0
Post likes count1

Don’t save anything you can recalculate

Raymond Chen

Nowadays, a major barrier to performance for many classes of programs is paging. We saw earlier this year that paging can kill a server. Today, another example of how performance became tied to paging. The principle is "Don't save anything you can recalculate." This of course, seems counterintuitive: Shouldn't you save the answer so you don't h...

History
Dec 17, 2004
Post comments count0
Post likes count1

How did Windows 95 rebase DLLs?

Raymond Chen

Windows 95 handled DLL-rebasing very differently from Windows NT. When Windows NT detects that a DLL needs to be loaded at an address different from its preferred load address, it maps the entire DLL as copy-on-write, fixes it up (causing all pages that contain fixups to be dumped into the page file), then restores the read-only/re...

History
Dec 15, 2004
Post comments count0
Post likes count2

The hunt for a faster syscall trap

Raymond Chen

The performance of the syscall trap gets a lot of attention. I was reminded of a meeting that took place between Intel and Microsoft over fifteen years ago. (Sadly, I was not myself at this meeting, so the story is second-hand.) Since Microsoft is one of Intel's biggest customers, their representatives often visit Microsoft to show off what t...

History
Dec 14, 2004
Post comments count0
Post likes count1

Why do dialog editors start assigning control IDs with 100?

Raymond Chen

When you use a dialog editor and insert new controls, they typically are assigned control IDs starting at around 100. Why? Because the small numbers are already taken. /* * Dialog Box Command IDs */ #define IDOK 1 #define IDCANCEL 2 #define IDABORT 3 #define IDRETRY 4 #define IDIGNORE ...

History
Dec 2, 2004
Post comments count0
Post likes count1

Why did Windows 95 run the timer at 55ms?

Raymond Chen

The story behind the 55ms timer tick rate goes all the way back to the original IBM PC BIOS. The original IBM PC used a 1.19MHz crystal, and 65536 cycles at 1.19MHz equals approximately 55ms. (More accurately, it was more like 1.19318MHz and 54.92ms.) But that just pushes the question to another level. Why 1.19...MHz, then? With that clock rat...

History
Dec 1, 2004
Post comments count0
Post likes count1

What is the purpose of the bmPlanes member of the BITMAP structure?

Raymond Chen

Many bitmap-related structures in Windows have a field called "planes". For example the structure has a member (which must be set to 1). The structure has a field called . What's the deal with that field? The EGA video adapter supported 16 simultaneous colors. This was an enormous improvement over the CGA, which supported only four colors. I...

History
Nov 22, 2004
Post comments count0
Post likes count1

When people ask for security holes as features: World-writable files

Raymond Chen

If I had a nickel each time somebody asked for a feature that was a security hole... I'd have a lot of nickels. For example, "I want a file that all users can write to. My program will use it as a common database of goodies." This is a security hole. For a start, there's an obvious denial of service attack by having a user open the file in ...

HistoryWhen people ask for security holes as features
Nov 18, 2004
Post comments count0
Post likes count0

If a program and a folder have the same name, the shell prefers the program

Raymond Chen

If you have both a folder named, say, and a program named and you type into the Start.Run dialog, you get the program and not the folder. Why is that? Because it is common to have where there is a setup program in the root, as well as a setup folder containing files needed by the setup program. Before Windows 95, you couldn't open...

History
Nov 9, 2004
Post comments count0
Post likes count1

A history of GlobalLock, part 4: A peek at the implementation

Raymond Chen

On one of our internal discussion mailing lists, someone posted the following question: We have some code that was using DragQueryFile to extract file paths. The prototype for DragQueryFile appears as follows: UINT DragQueryFile( HDROP hDrop, UINT iFile, LPTSTR lpszFile, UINT cch ); In the code we have, instead of passing an ...

History