Showing results for January 2005 - The Old New Thing

Jan 31, 2005
0
0

Why did the Win64 team choose the LLP64 model?

Raymond Chen
Raymond Chen

Over on Channel 9, member Beer28 wrote, "I can't imagine there are too many problems with programs that have type widths changed." I got a good chuckle out of that and made a note to write up an entry on the Win64 data model. The Win64 team selected the LLP64 data model, in which all integral types remain 32-bit values and only pointers ex...

History
Jan 28, 2005
0
1

Capturing the current directory from a batch file

Raymond Chen
Raymond Chen

Sometimes people go to great lengths to get information which is available in a much simpler way. We saw it a few days ago when we found a 200+-line C# program that could be replaced with a 90-byte batch file. Here's another example of a rather roundabout way of capturing the current directory from a batch file. The easy way is to use the pse...

Tips/Support
Jan 27, 2005
0
0

Control how much network bandwith Automatic Updates will use

Raymond Chen
Raymond Chen

By default, the Background Intelligent Transfer Service (BITS) which is used by Automatic Updates will use idle network bandwidth for downloading updates. This is normally not a problem. One case where it can be a problem is you have a large LAN that shares a single DSL connection. BITS doesn't see that that DSL connection is shared. Consequently,...

Tips/Support
Jan 26, 2005
0
0

The strangest way of rounding down to the nearest quarter

Raymond Chen
Raymond Chen

In a previous life, I wrote database software. A customer complained that one of their reports was taking an unacceptably long amount of time to generate, and I was asked to take a look at it even though it wasn't my account. The report was a vacation-days report, listing the number of vacation days taken and available for each employee. Vacati...

Other
Jan 25, 2005
0
0

Why do files and directories with no time/date mess up sorting in Explorer?

Raymond Chen
Raymond Chen

If you have a file or directory that does not have a last-modified date, you may find that it causes Explorer to sort very strangely. (How do you get a file or directory with no last-modifiied date? It's hard to do; you need the help of an external file system.) Why is this? As we learned earlier, a sort comparison function must impose a total or...

Tips/Support
Jan 24, 2005
0
0

Alton Brown book appearance report

Raymond Chen
Raymond Chen

Right on schedule, Alton Brown appeared at the Elliot Bay Book Company bookstore in downtown Seattle. One of my friends wondered aloud, "Wait a second, he's promoting his cookbook. How do you do a reading from a cookbook?" He didn't read from his cookbook. To an overflow crowd that probably violated a few fire codes, Alton Brown discussed what...

Non-Computer
Jan 24, 2005
0
0

Bringing cryptic command lines to Windows

Raymond Chen
Raymond Chen

The CMD.EXE batch language can be awfully cryptic, but for those who miss the richness of command lines like or bursts of line noise masquerading as a pipeline of "find", "sed", and "awk" processes, Microsoft Windows Services for Unix is available for free download.

Other
Jan 21, 2005
0
0

Why are kernel HANDLEs always a multiple of four?

Raymond Chen
Raymond Chen

Not very well known is that the bottom two bits of kernel HANDLEs are always zero; in other words, their numeric value is always a multiple of 4. Note that this applies only to kernel HANDLEs; it does not apply to pseudo-handles or to any other type of handle (USER handles, GDI handles, multimedia handles...) Kernel handles are things you can pas...

Code
Jan 20, 2005
0
0

Hyperlinking to Hutchison Whampoa Limited forbidden

Raymond Chen
Raymond Chen

Maybe they don't want people to find them. The copyright notice for the web site of Hutchison Whampoa Limited states, Copyright Hutchison Whampoa Limited. 2003. All rights reserved. No person, whether an individual or a body corporate, shall create or establish a hyperlink to the HWL Corporate Website by hypertext reference or imaging without ...

Other
Jan 20, 2005
0
0

A 90-byte “whereis” program

Raymond Chen
Raymond Chen

Sometimes people try too hard. You can download a C# program to look for a file on your PATH, or you can use a 90-character batch file:

Tips/Support