Showing results for July 2005 - The Old New Thing

Jul 29, 2005
0
0

Does Windows have a limit of 2000 threads per process?

Raymond Chen
Raymond Chen

Often I see people asking why they can't create more than around 2000 threads in a process. The reason is not that there is any particular limit inherent in Windows. Rather, the programmer failed to take into account the amount of address space each thread uses. A thread consists of some memory in kernel mode (kernel stacks and object management...

Other
Jul 28, 2005
0
0

What is this “web site” thing you are talking about?

Raymond Chen
Raymond Chen

One reaction I've seen when people learn about all the compatibility work done in the Windows 95 kernel is to say, Why not add code to the installer wizard [alas, page is now 404] which checks to see if you're installing SimCity and, if so, informs you of a known design flaw, then asks you to visit Electronic Arts' webpage for a patch? ...

History
Jul 27, 2005
0
0

When the normal window destruction messages are thrown for a loop

Raymond Chen
Raymond Chen

Last time, I alluded to weirdness that can result in the normal cycle of destruction messages being thrown out of kilter. Commenter Adrian noted that the WM_GETMINMAXINFO message arrives before WM_NCCREATE for top-level windows. This is indeed unfortunate but (mistake or not) it's been that way for over a decade and changing it now would ...

Code
Jul 26, 2005
0
1

What is the difference between WM_DESTROY and WM_NCDESTROY?

Raymond Chen
Raymond Chen

There are two window messages closely-associated with window destruction, the WM_DESTROY message and the WM_NCDESTROY message. What's the difference? The difference is that the WM_DESTROY message is sent at the start of the window destruction sequence, whereas the WM_NCDESTROY message is sent at the end. This is an important distinction when ...

Code
Jul 25, 2005
0
0

On paying for your meal upon leaving a restaurant

Raymond Chen
Raymond Chen

Robert Scoble's embarrassment over forgetting to pay a restaurant bill reminds me of an even more embarrassing incident experienced by a component team from the Windows 95 team. To celebrate something or other, their team went to lunch at The Salish Lodge, a fine dining establishment. At the end of the meal, everybody thought somebody else...

Other
Jul 25, 2005
0
0

Dinner at the Herbfarm in Woodinville

Raymond Chen
Raymond Chen

As part of the going-away festivities for my friend, a group of us went to The Herbfarm, the local restaurant referenced in Clue I of Puzzle #3. The restaurant is nestled in the Sammamish Valley, right next to the Willows Lodge resort and its restaurant, The Barking Frog. Less than a kilometer down the road is the Chateau Ste. ...

Non-Computer
Jul 22, 2005
0
0

Marin Alsop to be music director of the Baltimore Symphony Orchestra

Raymond Chen
Raymond Chen

Marin Alsop has been selected to lead the Baltimore Symphony Orchestra. The development has gotten a lot of attention, presumably, because this makes Maestra Alsop (as she prefers to be called) the first woman to be named music director of a major U.S. orchestra. I saw her perform in Seattle earlier this year and thought she did a fine job. If I'...

Non-Computer
Jul 22, 2005
0
0

The importance of passing the WT_EXECUTELONGFUNCTION flag to QueueUserWorkItem

Raymond Chen
Raymond Chen

One of the flags to the QueueUserWorkItem function is WT_EXECUTELONGFUNCTION. The documentation for that flag reads The callback function can perform a long wait. This flag helps the system to decide if it should create a new thread. As noted in the documentation, the thread pool uses this flag to decide whether it should create a new thread...

Code
Jul 21, 2005
0
0

FindFirstFile is not a SQL query

Raymond Chen
Raymond Chen

The function is not a SQL query. It's a very simple directory enumerator. There is a slightly fancier version called , but even that function doesn't add much at present beyond filtering for directories or devices. You don't get to pass it sort criteria like or "return the files/directories sorted smallest file first", or "return the files/...

Code