title: What does the CONFIGRET return-type mean?
body: <p>I was taking a look at the <a href="https://msdn.microsoft.com/en-us/library/windows/hardware/ff549794(v=vs.85).aspx" rel="nofollow noreferrer">PnP Configuration Manager functions</a> and saw that each begins with these three macros:</p>
  
  <pre><code>CMAPI CONFIGRET WINAPI
  </code></pre>
  
  <p>I had to dig inside <em>CfgMgr32.h</em> to find <code>CMAPI</code>, which is defined as:</p>
  
  <pre><code>#if !defined (_CFGMGR32_)
  #define CMAPI     DECLSPEC_IMPORT
  #else
  #define CMAPI
  #endif
  </code></pre>
  
  <p>According to <a href="http://timr.probo.com/wd3/071503/KernelDlls.htm" rel="nofollow noreferrer">Tim Roberts' article on DLL's in Kernel Mode</a>, this allows functions with <code>CMAPI</code> to be either loaded at run-time or link-time. And we already know that <code>WINAPI</code> is just a <a href="https://stackoverflow.com/a/2348447/975724">macro for a calling convention</a>.</p>
  
  <p>But what about <code>CONFIGRET</code>?  From <em>CfgMgr32.h</em>, it is defined as:</p>
  
  <pre><code>//
  // Standardized Return Value data type
  //
  typedef _Return_type_success_(return == 0) DWORD        RETURN_TYPE;
  typedef RETURN_TYPE  CONFIGRET;
  </code></pre>
  
  <p>I've never seen this before, what does this mean?  What is the return type of these functions?</p>