Showing archive results for 2008

Oct 3, 2008
Post comments count0
Post likes count1

Acquire and release sound like bass fishing terms, but they also apply to memory models

Raymond Chen

Many of the normal interlocked operations come with variants called InterlockedXxxAcquire and InterlockedXxxRelease. What do the terms Acquire and Release mean here? They have to do with the memory model and how aggressively the CPU can reorder operations around it. An operation with acquire semantics is one which does not permit subsequent me...

Code
Oct 2, 2008
Post comments count0
Post likes count1

The dangers of setting your double-click speed too short

Raymond Chen

After I noted how the window manager uses the double-click time as a basis for determining how good your reflexes are, people got all excited about reducing the double-click speed to make Windows feel peppier. But be careful not to go overboard. Back in the Windows 95 days, we got a bug from a beta tester that went roughly like this: T...

Tips/Support
Oct 1, 2008
Post comments count0
Post likes count0

An artist’s conception of the new citizenship test

Raymond Chen

Today is the first day of the controversial redesigned United States citizenship examination. For the next year, candidates who applied before today can choose whether they want to use the old test or the new one. To help prepare for the new examination, I propose the following warm-up, which I tested (with the assistance of another United Stat...

Non-Computer
Oct 1, 2008
Post comments count0
Post likes count1

Why do maximized windows lose their title bar translucency?

Raymond Chen

If you have translucent title bars enabled,¹ you may have noticed that the translucency goes away when you maximize a window. Why is that? This is a performance optimization. Opaque title bars are more efficient than translucent ones, and when you maximize a window, you're saying,² "I want to focus entirely on this window and no othe...

Other
Sep 30, 2008
Post comments count0
Post likes count1

2008 Q3 link clearance: Microsoft blogger edition

Raymond Chen

It's that time again: Sending some link love to my colleagues. [Raymond is currently away; this message was pre-recorded.]

Other
Sep 30, 2008
Post comments count0
Post likes count1

When computer programmers dabble in economics: Buying prepaid lunch vouchers

Raymond Chen

Several years ago, the Microsoft cafeterias phased out their prepaid lunch voucher system. Under the new system, you "load up" your security badge with money (either by paying cash at any register or by having the amount deducted from your paycheck) and then swipe your badge at card readers installed at each register. But in the old days, the syst...

Non-Computer
Sep 29, 2008
Post comments count0
Post likes count0

Meet the authors: Mario Hewardt and Daniel Pravat, authors of Advanced Windows Debugging

Raymond Chen

My colleague Mario Hewart just let me know that he and Daniel Pravat will be presenting at the PDC pre-con. In case you don't recognize the names, they're the authors of Advanced Windows Debugging, a book which I reviewed late last year. So if you want to get your debugging tips directly from the source, you know where to go. Besides, Mario s...

Other
Sep 29, 2008
Post comments count0
Post likes count1

Anybody can make up a generic mapping

Raymond Chen

Each component that uses ACLs to control access has its own idea of what GENERIC_READ, GENERIC_WRITE, and GENERIC_EXECUTE mean. It's not like there's a master list that somebody can make that lists them all, because I can make up a new one right here. Watch me: #define GIZMO_QUERY_STATUS 0x0001 #define GIZMO_QUERY_MEMBERS 0x0002 #define GIZM...

Code
Sep 26, 2008
Post comments count0
Post likes count2

ERRORLEVEL is not %ERRORLEVEL%

Raymond Chen

The command interpreter cmd.exe has a concept known as the error level, which is the exit code of the program most recently run. You can test the error level with the IF ERRORLEVEL command: IF ERRORLEVEL 1 ECHO error level is 1 or more <sidebar> The IF ERRORLEVEL n test succeeds if the error level is n or more. This was presumably becaus...

Code
Sep 25, 2008
Post comments count0
Post likes count0

The description of my 2008 PDC talk is wrong

Raymond Chen

The title is mostly okay, but the description is wrong. Thanks to the power of web scripting, I can't actually link to my talk; I can just link to the main session page, and then you'll have to go searching for it. (Maybe there's a direct link but I can't find it.) The title Windows 7: Deep Dive - What's New with Win32's user32 and comctl32...

Other