I am trying to understand a typedef but I am stuck with this Code:
   typedef _Return_type_success_(return == DUPL_RETURN_SUCCESS) enum
   {
    DUPL_RETURN_SUCCESS             = 0,
    DUPL_RETURN_ERROR_EXPECTED      = 1,
    DUPL_RETURN_ERROR_UNEXPECTED    = 2
   }DUPL_RETURN;
My question is:
1) What is the Return argument doing in parameter of a function
2) we usually define typedef like this
 typedef int foo;
I am unable to understand this above format.
I am a noobee to serious c++ programming, Thankyou for your time.
EDIT: I am trying to build this streaming app, so I need to retrieve frames as fast as possible, I came across a few articles that recommended DXGI way which is a fast solution. I am trying to understand how to use the windows desktop Duplication API. I found this code on official msdn website : here
 
    