Showing archive results for 2012

Nov 15, 2012
Post comments count0
Post likes count1

If you're going to write your own allocator, you need to respect the MEMORY_ALLOCATION_ALIGNMENT

Raymond Chen

This time, I'm not going to set up a story. I'm just going to go straight to the punch line. A customer overrode the operator in order to add additional instrumentation. Something like this: This worked out okay on 32-bit systems because in 32-bit Windows, is 8, and is also 8. If you start with a value that is a multiple of 8, then add 8 ...

Code
Nov 13, 2012
Post comments count0
Post likes count1

Microsoft Money crashes during import of account transactions or when changing a payee of a downloaded transaction

Raymond Chen

Update: An official fix for this issue has been released to Windows Update, although I must say that I think my patch has more style than the official one. You do not need to patch your binary. Just keep your copy of Windows 8 up to date and you'll be fine. For the five remaining Microsoft Money holdouts (meekly raises hand), here's a patch...

Code
Nov 12, 2012
Post comments count0
Post likes count1

Frequentists vs Bayesians

Raymond Chen

But, I mean, c'mon. Frequentists vs Bayesians? Worst. Action. Movie. Ever.

Non-Computer
Nov 12, 2012
Post comments count0
Post likes count1

Why are taskbar live previews lost when you use Fast User Switching?

Raymond Chen

Anonymous asks a metric buttload of questions, which means that I feel compelled to answer all or none. And given the choice, I decided to answer none. Okay, I will answer one and ignore the rest. Why are taskbar live previews lost when you use Fast User Switching? When you switch away from a user via Fast User Switching, the Desktop Window Man...

Other
Nov 9, 2012
Post comments count0
Post likes count1

Thread affinity of user interface objects: Addendum

Raymond Chen

Some time ago, I discussed the thread affinity of device contexts, noting that the and functions must be called from the same thread. The same restriction also applies to printer DCs. Printer DCs must be created and destroyed on the same thread. The printing team imposed this additional rule in order to make it easier for printer driver vendors...

Code
Nov 8, 2012
Post comments count0
Post likes count1

What does the COINIT_SPEED_OVER_MEMORY flag to CoInitializeEx do?

Raymond Chen

One of the flags you can pass to is , which is documented as : Trade memory for speed. This documentation is already vague since it doesn't say which direction the trade is being made. Are you reducing memory to increase speed, or increasing memory by reducing speed? Actually it's neither: If you pass this flag, then you are instructing COM to...

History
Nov 7, 2012
Post comments count0
Post likes count1

Instead of trying to create a filter that includes everything, try just omitting the filter

Raymond Chen

The question was sent to a peer-to-peer discussion group for an internal program, let's call it Program Q. I'll add additional context so you can follow along. Hi, I'm trying to build a query that finds all issues owned by a particular user, regardless of which product the issue belongs to. I know that I can query for specific products by sayi...

Other
Nov 6, 2012
Post comments count0
Post likes count1

If you're asking somebody to help you, you want to make it easy for them, not harder

Raymond Chen

A customer liaison asked a question that went roughly like this: From: Liaison My customer is having a problem with the header file winfoo.h. The environment is Windows Vista German SP1 with Visual Studio 2008 Professional German SP1 and Windows SDK 6000.0.6000 German. When they try to include the file in their project, they get an error on lin...

OtherThe social skills of a thermonuclear device
Nov 5, 2012
Post comments count0
Post likes count1

How do I get the tabbed dialog effect on my own custom tabbed dialog?

Raymond Chen

CJ observed that the standard tabbed dialogs provide an effect on the tab pages and want to know how to get the tabbed dialog effect on custom dialogs. fds242 noted this as well and wanted to know why the automatic tabbed dialog effect doesn't kick in until you put a static control on the child dialog box. Let's look at the first question firs...

Code