Showing tag results for Other

May 15, 2007
Post comments count0
Post likes count1

Command lines need to be quoted; paths don't

Raymond Chen

While it's true that one category of problems comes from failing to quote spaces in command lines, it is a false statement that "path names in the registry should have quotation marks around them for obvious reasons." In fact it's the opposite. Path names should not be quoted. Think about it: Quotation marks are a parsing issue, not a file name i...

Other
May 9, 2007
Post comments count0
Post likes count1

Don't be helpless: At least look at the function you're using

Raymond Chen

Sometimes I see people ask a question and get an answer, but the answer doesn't quite work. But instead of trying to understand the answer in order to see why it doesn't work and develop a better solution, they just play stupid. Here's an example. The names have been changed but the story's the same. How do I get a handle to a bright pink elepha...

Other
May 8, 2007
Post comments count0
Post likes count2

The administrator is an idiot

Raymond Chen

Nearly all computer administrators are idiots. That's not because the personnel department is incompetent or because it's impossible to train competent administrators. It's because, for a consumer operating system, the computer administrator didn't ask to be one. In nearly all cases, the computer administrator is dad or grandma.† They didn'...

Other
May 3, 2007
Post comments count0
Post likes count2

Quick overview of how processes exit on Windows XP

Raymond Chen

Exiting is one of the scariest moments in the lifetime of a process. (Sort of how landing is one of the scariest moments of air travel.) Many of the details of how processes exit are left unspecified in Win32, so different Win32 implementations can follow different mechanisms. For example, Win32s, Windows 95, and Windows NT all shut down...

Other
May 1, 2007
Post comments count0
Post likes count1

Microspeak: Operationalize

Raymond Chen

Here are a few citations for the word operationalize. A lot of work lies ahead to operationalize this plan. Provide security guidance and tools to help operationalize security for enterprise environments. I thought it meant "carry out" or "put into effect", and then I saw this sentence: Operationalize the demo (get computers configured, insta...

OtherMicrospeak
Apr 26, 2007
Post comments count0
Post likes count1

Using the "gu" debugger command to find the infinite loop

Raymond Chen

Somebody says, "Your program is consuming 100% CPU" and hands you a debug session. Usually, this happens because one thread has gotten stuck in an infinite loop. And if you're lucky it's the type of infinite loop that's easy to diagnose because it's just one function that isn't returning. (The more complicated types are where a function does some ...

Other
Apr 25, 2007
Post comments count0
Post likes count1

Identifying an object whose underlying DLL has been unloaded

Raymond Chen

Okay, so I gave it away in the title, but follow along anyway. Your program chugs along and then suddenly it crashes like this: Instantly you recognize the following: This is a virtual method call. (Call indirect through register plus offset.) — Very high confidence. The vtable is in . (That is the base register of the ind...

Other
Apr 24, 2007
Post comments count0
Post likes count3

What is the underlying object behind a COM interface pointer?

Raymond Chen

When you're debugging, you might have a pointer to a COM interface and want to know what the underlying object is. Now, sometimes this trick won't work because the interface pointer actually points to a stub or proxy, but in the case where no marshalling is involved, it works great. (This technique also works for many C++ compilers for any object ...

Other
Apr 23, 2007
Post comments count0
Post likes count1

Psychic debugging: When reading unfamiliar code, assume it's mostly correct

Raymond Chen

You may be called in to study a problem in code you've never seen before or be asked to look over a proposed change to some code you've never seen before. When this happens, you have to take shortcuts in your analysis because following every function call to the bottom would not only take far too much time, but also take you so far away from the c...

Other
Apr 17, 2007
Post comments count0
Post likes count2

The Notepad file encoding problem, redux

Raymond Chen

About every ten months, somebody new discovers the Notepad file encoding problem. Let's see what else there is to say about it. First of all, can we change Notepad's detection algorithm? The problem is that there are a lot of different text files out there. Let's look just at the ones that Notepad supports. 8-bit ANSI (of which 7-bit ASCII is...

Other