Showing results for June 2014 - Page 2 of 3 - The Old New Thing

Jun 18, 2014
0
0

10 is the new 6

Raymond Chen
Raymond Chen

While it may no longer be true that everything at Microsoft is built using various flavors of Visual C++ 5.0, 6.0, and 7.0, there is still a kernel of truth in it: A lot of customers are still using Visual C++ 6.0. That's why the unofficial slogan for Visual C++ 2010 was 10 is the new 6. Everybody on the team got a T-shirt with the slogan (...

History
Jun 17, 2014
0
0

Who would ever write a multi-threaded GUI program?

Raymond Chen
Raymond Chen

During the development of Windows 95, the user interface team discovered that a component provided by another team didn't work well under multi-threaded conditions. It was documented that the function had to be the first call made by a thread into the component. The user interface team discovered that if one thread called , and then used the...

History
Jun 16, 2014
0
0

Enumerating bit strings with a specific number of bits set (binomial coefficients strike again)

Raymond Chen
Raymond Chen

Today's Little Program prints all bit strings of length n subject to the requirement that the string have exactly k 1-bits. For example, all bit strings of length 4 with 2 bits set are 0011, 0101, 0110, 1001, 1010, and 1100. Let's write BitString(n, k) to mean all the bit strings of length n with exactly k bits set. Let's look at the last ...

Code
Jun 13, 2014
0
0

Non-classical processor behavior: How doing something can be faster than not doing it

Raymond Chen
Raymond Chen

Consider the following program: The program generates a lot of random integers in the range 0..9 and then counts how many are less than 0, less than 1, less than 2, and so on. It also prints how long the operation took in QPC units. We don't really care how big a QPC unit is; we're just interested in the relative values. (We print the number of...

Code
Jun 12, 2014
0
0

Can we continue to call FindNextFile() with the same handle that returned an error last time?

Raymond Chen
Raymond Chen

A customer wanted to know whether it was okay to call with the same handle that returned an error last time. In other words, consider the following sequence of events: The customer elaborated: Suppose that the directory contains four files, A, B, C, and D. We expect the following: After returns an error, can we continue to search with ...

Code
Jun 11, 2014
0
0

Why do network servers sometimes show up as a Recycle Bin Location?

Raymond Chen
Raymond Chen

A customer wanted to know why some of their users showed network servers among the locations shown in the Recycle Bin property sheet. Answer: Because those users are using Folder Redirection. In particular, if you redirect the My Documents folder, then a network Recycle Bin location is created to hold the files deleted from My Documents. The ...

Tips/Support
Jun 10, 2014
0
0

Microspeak: Brownbag

Raymond Chen
Raymond Chen

Remember, Microspeak is not merely for jargon exclusive to Microsoft, but it's jargon that you need to know. The term brownbag (always one word, accent on the first syllable) refers to a presentation given during lunch. The attendees are expected to bring their lunch to the meeting room and eat while they listen to the presentation. A brownbag ...

Non-ComputerMicrospeak
Jun 9, 2014
0
0

Improving the performance of CF_HDROP by providing file attribute information

Raymond Chen
Raymond Chen

The clipboard format is still quite popular, despite its limitation of being limited to files. You can't use it to represent virtual content, for example. For all of you still using , you can improve the performance of drag/drop operations by adding a little more information to your data object. Observe that the clipboard format is just a ...

Code