If this isn't a Metro style app project then this is likely not the correct forum for this question.
If you are using a metro style app project, could you elaborate on your project type and the exact build error? A snippet of the source failing to compile would be useful as well. The syntax for that desktop Win32 API is here:
CoCreateInstanceFromApp
I had this same problem, in my case it was an old library that I was trying to port to winrt and I had defined somewhere #define _WIN32_WINNT 0x0601. Changing it to #define _WIN32_WINNT 0x0602 solved the issue for me.