// RuntimeForStatic base library | C+- (SysRoutine) | Author: Sergei Y.Kitáev
#include "Precompiled.h"
#include "SharedIncludes.h"
namespace RuntimeForStatic {
//==================================================================================================

bool $Handles::Close($A, const std::initializer_list<HANDLE volatile*>& handlePointers ) $last_error
{
   $ErrorInfo errorInfo;
   for (auto pHandle: handlePointers)
      if ( !$Handle::Close($ci, pHandle ) )
         errorInfo = $LE::ErrorInfo();
   return errorInfo.ApplyToLastError($ci);
}

bool $Handles::Close($A, const std::initializer_list<HANDLE volatile*>& handlePointers,
                         bool isOfInvalidHandleValueCategory ) $last_error
{
   $ErrorInfo errorInfo;
   for (auto pHandle: handlePointers)
      if ( !$Handle::Close($ci, pHandle, isOfInvalidHandleValueCategory ) )
         errorInfo = $LE::ErrorInfo();
   return errorInfo.ApplyToLastError($ci);
}

//==================================================================================================
} // RuntimeForStatic
