0

I know typedef is used to give specific names to other types but I have never seen this syntax before. How does this evaluate? What type is being wrapped to what?

typedef HRESULT(WINAPI* DXGIGetDebugInterface)(REFIID, void**);
JaMiT
  • 14,422
  • 4
  • 15
  • 31
  • 2
    The cynical answer is that Windows code does lots of stuff that no-one has ever seen before. – Pete Becker Jun 11 '21 at 13:24
  • 1
    I particularly like [this answer](https://stackoverflow.com/a/4295451/10871073) to the duplicate question. – Adrian Mole Jun 11 '21 at 13:27
  • 1
    The modern C++ alternative way — arguably syntactically easier on the eyes — of making DXGIGetDebugInterface identifier specify the same type alias: `using DXGIGetDebugInterface = HRESULT(WINAPI*)(REFIID, void**);` – Eljay Jun 11 '21 at 14:03

0 Answers0