Oh, I see, the cubie doesn't use the new framework. I'll see if I can find out anything else for you.
Btw, I notice the cubie has a line
;invoke ExitProcess, NULL
Unfortunately you absolutely need that on Vista else the program will not exit cleanly.
Jim