CoCreateInstance for Quick Sync Video H.264 Encoder returns E_FAIL
I'm trying to encode raw NV12 buffers using Window Media Foundation Transforms. I iterate over the available hardware encoders using MFEnumEx, extract the GUID from the activation object which supports hardware encoding. Then when I try to create the transform object using CoCreateInstance(), the function returns E_FAIL. What am I doing wrong? I've pasted all my test code here with the steps to reproduce this issue.
I've seen a couple of other posts in this forum with somewhat related issue dating from back to 2013. As I understand Quick Sync is supported through the Windows Media Transform API, or am I wrong?