Thanks for following up on this and posting the solution.
I had exactly the same problem with a C# application, compiled in Visual Studio 2008 on 64-bit Windows 7 RTM.
I had to do two things to get my project to work:
(1) As you point out, change the target platform from "Any" to "x86"...