title: Return argument in function parameter of C++
body: <p>I am trying to understand a typedef but I am stuck with this Code:</p>
  
  <pre><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;
  </code></pre>
  
  <p>My question is:</p>
  
  <p>1) What is the Return argument doing in parameter of a function</p>
  
  <p>2) we usually define typedef like this</p>
  
  <pre><code> typedef int foo;
  </code></pre>
  
  <p>I am unable to understand this above format.</p>
  
  <p>I am a noobee to serious c++ programming, Thankyou for your time.</p>
  
  <p>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 : <a href="https://code.msdn.microsoft.com/windowsdesktop/Desktop-Duplication-Sample-da4c696a" rel="nofollow noreferrer">here</a></p>