Alternative to __uuidof in C

后端 未结 2 687
轮回少年
轮回少年 2020-12-17 17:24

I\'m working with a C project that\'s using DirectX and I\'ve run into a problem. Certain DX calls require a IID object, typically generated with __uuidof

相关标签:
2条回答
  • 2020-12-17 18:02

    __uuidof is only available in C++, as error described. I think you already have definitions of the GUIDs of the interfaces for C available in DX header files.

    http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/1306b57f-4b75-4f0c-b4f3-9bcc1e3a0dd6

    From d3d11.h:

    EXTERN_C const IID IID_ID3D11Texture2D;
    

    Use this instead of __uuidof(ID3D11Texture2D).

    0 讨论(0)
  • 2020-12-17 18:15

    you have to find the uuid or "guid" of the class. it should be in some header in the directx sdk (older) or in the Platform SDK (on Windows Vista and Windows 7) - depends on what you are using.

    0 讨论(0)
提交回复
热议问题