You example was for C++.
So
#define IID_PPV_ARGS(ppType) ((void**)(ppType))
Result = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, &IID_IWICImagingFactory, IID_PPV_ARGS(&Factory));
orResult = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, &IID_IWICImagingFactory, (void**)&Factory);