Showing archive results for 2013

Jul 3, 2013
Post comments count0
Post likes count2

Why don't elevated processes inherit their environment variables from their non-elevated parent?

Raymond Chen

As a general rule, child processes inherit the environment of their parent. But if the parent is non-elevated and the child is elevated, then this inheritance does not happen. Why not? There are two answers to this question. For the kernel-color glasses answer, I defer to Chris Jackson, the App Compat Guy. It's interesting to see how it all works...

Other
Jul 2, 2013
Post comments count0
Post likes count1

I didn't go to //build/ in San Francisco, but I'll be at RAMP in Budapest

Raymond Chen

Larry went to //build/, but I didn't. On the other hand, I will be at RAMP in Budapest. I will be presenting (in English) on the evolution of Windows, specifically on the lessons learned over the first two decades of Windows that led to the design of WinRT, the Windows Runtime. Although the conference has sold out, you can register for free to ...

Other
Jul 2, 2013
Post comments count0
Post likes count1

You can read as well as I can, or maybe not

Raymond Chen

Occasionally, somebody will ask for help on a distribution list, and it turns into a really annoying case of hand-holding. From: X I'm using the XYZ toolset to do some document management, and I want the server to run a script whenever somebody tries to modify the master template, so it can run validations before accepting the update, such as...

OtherThe social skills of a thermonuclear device
Jul 1, 2013
Post comments count0
Post likes count1

I wonder what sort of efficiency that house gets on the Autobahn

Raymond Chen

I dreamed that I discovered a path behind my house that led to a playground. It also led to the house of one of my friends. To access to the path from her house, you had to swing the stove away from the wall, exposing a secret door. Also, she drove her house to Europe. ("No need to pack your suitcases, kids. We're taking the whole house!")

Non-ComputerDream
Jul 1, 2013
Post comments count0
Post likes count1

Building on our program that draws content at a fixed screen position regardless of window position

Raymond Chen

Today's Little Program uses the technique we saw last week of drawing content at a fixed screen position, regardless of window position, but adds a little physics to it. Start with our scratch program and make these changes: The class simulates damped motion. Ask a physicist how it works. The rest point is the center of the window. T...

Code
Jun 28, 2013
Post comments count0
Post likes count1

2013 mid-year link clearance

Raymond Chen

Another round of the semi-annual link clearance. And, as always, the obligatory plug for my column in TechNet Magazine:

Other
Jun 28, 2013
Post comments count0
Post likes count1

It’s the address space, stupid

Raymond Chen

Nowadays, computers have so much memory that running out of RAM is rarely the cause for an "out of memory" error. Actually, let's try that again. For over a decade, hard drive have been so large (and cheap) that running out of swap space is rarely the cause for an "out of memory" error. In user-mode, the term memory refers to virtual memory,...

Code
Jun 27, 2013
Post comments count0
Post likes count1

Once you return from the WM_ENDSESSION message, your process can be terminated at any time

Raymond Chen

A customer had a program which performed some final I/O operations as it exited. Various C++ objects deleted files or flushed buffers as part of their destructors. The customer found that if their program was left running when the user shut down Windows, then the files never got deleted, and the buffers were never flushed. On the other hand, if the...

Code
Jun 26, 2013
Post comments count0
Post likes count1

The default error mode (SetErrorMode) is not zero

Raymond Chen

A customer put the following code at the start of their program: // If this assertion fires, then somebody else changed the error mode // and I just overwrote it with my error mode. ASSERT(SetErrorMode(SEM_FAILCRITICALERRORS) == 0); The customer wanted to know whether it was a valid assumption that the initial error mode for a process is zero....

Code
Jun 25, 2013
Post comments count0
Post likes count1

Where did the names of the fonts Marlett and Verdana come from?

Raymond Chen

Commenter BAA says that the -lett part of Marlett comes from the designer Virginia Howlett. BAA adds, "I forget the 'Mar' but I believe it was a co-creator." If so, then that co-creator was Suzan Marashi, if Vincent Connare is to be trusted. On page 17 of the PDF document From The Dark Side..., Connare identifies the authors of the font as Virgi...

History