Showing results for December 2003 - Page 4 of 5 - The Old New Thing

Dec 11, 2003
0
0

Voyage to Our Hollow Earth

Raymond Chen
Raymond Chen

Slashdot's story about the amateur adventurer who is now stranded at McMurdo Base (because he underestimated his fuel requirements for a trip over the South Pole) reminded me of a controversy abrew at the other end of the planet: The hole at the North Pole. To resolve this matter, Steve Currey i...

Non-Computer
Dec 11, 2003
0
0

How do I pass a lot of data to a process when it starts up?

Raymond Chen
Raymond Chen

As we discussed yesterday, if you need to pass more than 32767 characters of information to a child process, you'll have to use something other than the command line. One method is to wait for the child process to go input idle, then for some agreed-upon window and send it a message. This method has a few problems: You have to come up with...

Code
Dec 10, 2003
0
1

What is the command line length limit?

Raymond Chen
Raymond Chen

It depends on whom you ask. The maximum command line length for the CreateProcess function is 32767 characters. This limitation comes from the UNICODE_STRING structure. CreateProcess is the core function for creating processes, so if you are talking directly to Win32, then that's the only limit you have to worry about. But if you are reaching Cr...

Code
Dec 9, 2003
0
0

Scoble's rant on UI defaults

Raymond Chen
Raymond Chen

Robert Scoble posted an entry in his Longhorn blog on the subject of what the UI defaults should be. It sure has stirred up a lot of controvery. I may pick at the remarks over the upcoming days, but for now I posted responses to two of the comments he kicked up. We recently did a survey of users of al...

History
Dec 9, 2003
0
0

Why you should never suspend a thread

Raymond Chen
Raymond Chen

It's almost as bad as terminating a thread. Instead of just answering a question, I'm going to ask you the questions and see if you can come up with the answers. Consider the following program, in (gasp) C#: When you run this program and hit Enter to suspend, the program hangs. But if you change the worker function to just "for(;;) {}" the ...

Code
Dec 8, 2003
0
0

If FlushInstructionCache doesn't do anything, why do you have to call it?

Raymond Chen
Raymond Chen

If you look at the implementation of FlushInstructionCache on Windows 95, you'll see that it's just a return instruction. It doesn't actually do anything. So why do you have to call it? Because the act of calling it is the whole point. The control transfers implicit in calling a function suffice to flush the instruction cache on a Pentium. The fu...

History
Dec 7, 2003
0
0

At least she represents the United States faithfully

Raymond Chen
Raymond Chen

The MPR show Marketplace (note: MPR, not NPR) had a brief story about the reaction to China being the host of the Miss World pageant. (Last story on the page.) What I noticed was the comment at timecode 23:50 from Miss World - United States Kim Harlan. (Not to be confused with Miss ...

Non-Computer
Dec 5, 2003
0
0

Why do I have to return this goofy value for WM_DEVICECHANGE?

Raymond Chen
Raymond Chen

To deny a device removal query, you must return the special value BROADCAST_QUERY_DENY, which has the curious value 0x424D5144. What's the story behind that? Well, we first tried following the pattern set by WM_QUERYENDSESSION, where returning TRUE allows the operation to proceed and returning FALSE causes the operation to fail. But when we did t...

History
Dec 4, 2003
0
0

Which access rights bits belong to whom?

Raymond Chen
Raymond Chen

Each ACE in a security descriptor contains a 32-bit access mask. Which bits belong to whom? The access rights mask is a 32-bit value. The upper 16 bits are defined by the operating system and the lower 16 bits are defined by the object being secured. For example, consider the value 0x00060002 for the access rights mask. This breaks down as the sy...

Code