Showing tag results for History

Aug 27, 2009
Post comments count0
Post likes count1

What is the maximum number of timers a program can create?

Raymond Chen
Raymond Chen

As MSDN correctly notes, "Timers are a limited global resource." How limited are they? (We're talking about timers created by .) Not as limited as they once were. Originally, there were eight timers total for the entire system. When there are only eight timers, you have to be very careful not to waste them and to destroy them when they aren't nee...

History
Jul 22, 2009
Post comments count0
Post likes count0

Microspeak: Whale Boy

Raymond Chen
Raymond Chen

Today is the tenth anniversary of Windows Live Messenger. My colleague Danny Glasser provides some history behind the product, and you can watch a tenth anniversary celebration video created for the occasion. And thus is inspired today's Microspeak: Whale Boy. Whale Boy is the nickname for the pawn-shaped Messenger buddy icon. His normal state i...

History
Jul 20, 2009
Post comments count0
Post likes count1

Why was MoveTo replaced with MoveToEx?

Raymond Chen
Raymond Chen

Commenter Ulric asks, "Where did MoveTo(HDC, int, int) go?" Back in the 16-bit days, the function to move the current point was called , and its return value was a which encoded the previous position, packing two 16-bit coordinates into a single 32-bit value. As part of the transition to 32-bit Windows, GDI switched to using 32-bit coordinates ...

History
Jul 9, 2009
Post comments count0
Post likes count1

MS-DOS also allowed spaces in file names, although vanishingly few programs knew how to access them

Raymond Chen
Raymond Chen

A little-known fact about MS-DOS is that it allowed spaces in file names. Sure, you were limited to 8.3, but a file called "" was legal in MS-DOS, and you could indeed create such a file. Good luck finding programs that didn't treat you as insane when you asked for that file, though. Although the file system supported files with spaces, practicall...

History
Jun 15, 2009
Post comments count0
Post likes count1

Why do some file operations take file names and others take handles?

Raymond Chen
Raymond Chen

Commenter Brian Friesen asks why some functions (like SetFileAttributes) take a file name, while others (like SetFileTime) take a handle and why we can't have two versions of every API, one for each pattern. Second question first: No need to wait for the kernel folks to write such a function; you can already do it yourself! // Following "pid...

History
Jun 10, 2009
Post comments count0
Post likes count1

Why does MS-DOS use 8.3 filenames instead of, say, 11.2 or 16.16?

Raymond Chen
Raymond Chen

When I discussed years ago why operating system files tend to follow the old 8.3 file name convention, I neglected to mention why the old MS-DOS filename convention was 8.3 and not, say, 11.2 or 16.16. It's a holdover from CP/M. As I noted when I discussed the old MS-DOS wildcard matching rules, MS-DOS worked hard at being compatible with ...

History
Jun 3, 2009
Post comments count0
Post likes count1

What does the “Zw” prefix mean?

Raymond Chen
Raymond Chen

If you spend time in kernel mode, you're accustomed to seeing functions with two-letter (or occasionally, three-letter) prefixes that indicate which component they belong to. What does the "Zw" mean? Answer: Nothing. The people who chose the letters wanted to pick something that was unlikely to collide with anything. Perhaps they had a pr...

History
Jun 1, 2009
Post comments count0
Post likes count1

Why does the CreateProcess function modify its input command line?

Raymond Chen
Raymond Chen

One of the nasty gotchas of the function is that the parameter must be a mutable pointer. If you pass a pointer to memory that cannot be written to (for example, a pointer to a page that is marked ), then you might crash. Commenter Ritchie wonders why this parameter is so weird. Basically, somebody back in the 1980's wanted to avoid allocatin...

History
Apr 23, 2009
Post comments count0
Post likes count1

Why are there two values for PSH_WIZARD97?

Raymond Chen
Raymond Chen

Welcome, Slashdot readers. Remember, this Web site is for entertainment purposes only. If you go cruising through the commctrl.h header file, you'll find that there are two different definitions for PSH_WIZARD97: #if (_WIN32_IE >= 0x0400) ... #if (_WIN32_IE < 0x0500) #define PSH_WIZARD97 0x00002000 #else #define PSH_WIZARD97 ...

History
Apr 17, 2009
Post comments count0
Post likes count1

Why is the animation common control limited to RLE8-compressed animations?

Raymond Chen
Raymond Chen

The animation common control is very limited in the type of animations it can play. The animation must be in AVI format, it cannot have any sound, and it must be either uncompressed or use RLE8 compression. Why so many restrictions? Because if it could handle other file formats, play sound, and support arbitrary codecs, it would just be a reimple...

History