Inside SWT

Monday, October 16, 2006

Windows 64-bit

I'm currently working with Grant Gayed, porting SWT to Windows 64. Some smart guys from Intel submitted a great patch (57151). However, each line of code needs to be painfully checked. Why?

"Every line is sacred, every line is great ..."

Ok, the real reason: it's easy to make subtle mistakes and cause GP's. We found only a few so far (because those guys did such a great job). Anyway, during our travels, we got to see the Windows API again and I forgot how funny some of it was. Here are a few things we ran across:

#define TECHNOLOGY 2 // bet you didn't know that!

typedef enum tagFUNCKIND {
FUNC_VIRTUAL,
FUNC_PUREVIRTUAL,
FUNC_NONVIRTUAL,
FUNC_STATIC,
FUNC_DISPATCH,
} FUNCKIND // FUNCKIND kids these days!

BOOL InitCommonControlsEx(
const LPINITCOMMONCONTROLSEX lpInitCtrls
); // Horny little devils

STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4
// What the ?!?!

Steve