Compiler Error C2773

#import only available in C++ compiler

Only the C++ compiler recognizes the #import preprocessor directive. Make sure the source file is specified as C++ (/TP).