title: How to call DXGI from C without __uuidof
body: <p>I'm unsure of how to get DXGI GUIDs without the C++-only __uuidof operator. It's used all over the MSDN code. I'm also unsure of the syntax of calling OO Windows APIs in C.</p>
  
  <p>I've checked on MSDN and here, but found nothing.</p>
  
  <pre><code>#ifdef __cplusplus
  CreateDXGIFactory(__uuidof(IDXGIFactory), (void **)&amp;factory);
  factory-&gt;EnumAdapters(0, &amp;adapter);
  adapter-&gt;EnumOutputs(0, &amp;output);
  #else // C version, not correct AFAIK
  ?? CreateDXGIFactory(&amp;IID_IDXGIFactory, (void **)&amp;factory);
  ?? IDXGI_EnumAdapters(factory, 0, &amp;adapter);
  ?? IDXGI_EnumOutputs(adapter, 0, &amp;output);
  #endif
  </code></pre>
  
  <p>The first works, but the C version fails with unresolved, DXGI-related externals (EnumAdapters and EnumOutputs and IID_DXGIFactory).</p>