There is a problem with running the cuda by example examples on cuda4 with vs2010
Where the.cu file includes windows headers directly it ends in an include trail which includes objbase.h and you get an error with Iunknown not found.
The solution is to put:
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#endif
Before any c/c++ includes in the .cu file
Or ideally of course don’t mix .cu and c/c++