Showing results for 2005 - Page 34 of 40 - The Old New Thing

Mar 16, 2005
Post comments count0
Post likes count0

Windows NT Security in Theory and Practice

Raymond Chen
Raymond Chen

Today, I'm not writing anything new. Instead, I'm referring you to the series of articles by Ruediger Asche starting with Windows NT Security in Theory and Practice. These articles are quite old but the principles are still sound. Just bear in mind that the newer stuff won't be covered.

Other
Mar 15, 2005
Post comments count0
Post likes count2

Windows are not cheap objects

Raymond Chen
Raymond Chen

Although Windows is centered around, well, windows, a window itself is not a cheap object. What's more, the tight memory constraints of systems of 1985 forced various design decisions. Let's take for example the design of the list box control. In a modern design, you might design the list box control as accepting a list of child windows, each of w...

History
Mar 14, 2005
Post comments count0
Post likes count0

Dot-Con Job: How InfoSpace took its investors for a ride

Raymond Chen
Raymond Chen

The Seattle Times ran an excellent series last week on the rise and fall of InfoSpace and its charismatic leader, Naveen Jain, who at one point even used the phrase "cult leader" to refer to himself. To set the tone, and perhaps to serve as a reference while you read the series, here's a list of reported Infospace earnings per share (EPS), b...

Non-Computer
Mar 14, 2005
Post comments count0
Post likes count0

A subtlety in restoring previous window position

Raymond Chen
Raymond Chen

A common feature for many applications is to record their screen location when they shut down and reopen at that location when relaunched. If implemented naively, a program merely restores from its previous position unconditionally. You run into usability problems with this naive implementation. If a user runs two copies of your program, the two w...

Other
Mar 11, 2005
Post comments count0
Post likes count0

VegFest 2005 this weekend – and – vegetarian is as vegetarian does

Raymond Chen
Raymond Chen

The weekend of March 12th and 13th, Vegetarians of Washington is hosting VegFest 2005, a festival of vegetarian food. This reminds me of a Time Magazine cover story from July 2002, wherein it was revealed that... In a survey of 11,000 individuals, 37% of those who responded "Yes, I am a vegetarian" also reported that in the previous 24 hours t...

Non-Computer
Mar 11, 2005
Post comments count0
Post likes count0

Performance gains at the cost of other components

Raymond Chen
Raymond Chen

In the operating systems group, we have to take a holistic view of performance. The goal is to get the entire system running faster, balancing applications against each other for the greater good. Applications, on the other hand, tend to have a selfish view of performance: "I will do everything possible to make myself run faster. The impact on th...

Other
Mar 10, 2005
Post comments count0
Post likes count0

Why does SystemParametersInfo hang when I pass the SPIF_SENDCHANGE flag?

Raymond Chen
Raymond Chen

If you pass the flag to the function, it will broadcast the message with the wParam equal to the system parameter code you passed. For example, if you call then the system will broadcast the message If there is a window that isn't responding to messages, then this broadcast will hang until that unresponsive window finally resumes respon...

Code
Mar 9, 2005
Post comments count0
Post likes count0

Using SystemParametersInfo to access user interface settings

Raymond Chen
Raymond Chen

The function gives you access to a whole slew of user interface settings, and it is the only supported method for changing those settings. I'm not going to list every single setting; go read the list yourself. Here are some highlights: Here are some control panel settings. Notice that when using the SPI_SET* commands, you also have to choo...

Code
Mar 8, 2005
Post comments count0
Post likes count1

Keep your eye on the code page

Raymond Chen
Raymond Chen

Remember that there are typically two 8-bit code pages active, the so-called "ANSI" code page and the so-called "OEM" code page. GUI programs usually use the ANSI code page for 8-bit files (though utf-8 is becoming more popular lately), whereas console programs usually use the OEM code page. This means, for example, when you open an 8-bit text fil...

Other
Mar 7, 2005
Post comments count0
Post likes count0

A timed context menu

Raymond Chen
Raymond Chen

This is sort of in the same spirit as our previous exercise in writing a timed message box, but this is much easier. Here, we use the handy-dandy message to get us out of menu mode. Before displaying the menu, we set a timer. (And we use a thread timer because we don't own the window and therefore don't know what timer IDs are safe to use.)...

Code