//**************************************************************************************************
//
// AUTOMATIC RELEASE FOR COM-INTERFACE — PREPROCESSOR:
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// RuntimeForStatic base library | C+- (SysRoutine) | Author: Sergei Y.Kitáev
#pragma once
#include "include_restrictions.h"

//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//
// COM-INTERFACE AUTO-RELEASE CREATION DEFS:
//
//==================================================================================================
// SINGLE POINTER (COM-INTERFACE AUTO-RELEASE):

#define $COM_AUTO( pointer ) \
   RuntimeForStatic::$COMAuto $IDENT_AUTO($com_auto_)($, ($PPIUnknown)&(pointer) )

#define $COM_AUTO_VAR( variable, pointer ) \
   RuntimeForStatic::$COMAuto variable($, ($PPIUnknown)&(pointer) )

//--------------------------------------------------------------------------------------------------
// ARRAY OF POINTERS (COM-INTERFACE AUTO-RELEASE):

#define $COM_AUTO_2( p1, p2 ) \
   RuntimeForStatic::$COMAutoArray $IDENT_AUTO($com_auto_array_)($, \
      { ($PPIUnknown)&(p1), ($PPIUnknown)&(p2) } )
#define $COM_AUTO_3( p1, p2, p3 ) \
   RuntimeForStatic::$COMAutoArray $IDENT_AUTO($com_auto_array_)($, \
      { ($PPIUnknown)&(p1), ($PPIUnknown)&(p2), ($PPIUnknown)&(p3) } )
#define $COM_AUTO_4( p1, p2, p3, p4 ) \
   RuntimeForStatic::$COMAutoArray $IDENT_AUTO($com_auto_array_)($, \
      { ($PPIUnknown)&(p1), ($PPIUnknown)&(p2), ($PPIUnknown)&(p3), ($PPIUnknown)&(p4) } )
#define $COM_AUTO_5( p1, p2, p3, p4, p5 ) \
   RuntimeForStatic::$COMAutoArray $IDENT_AUTO($com_auto_array_)($, \
      { ($PPIUnknown)&(p1), ($PPIUnknown)&(p2), ($PPIUnknown)&(p3), ($PPIUnknown)&(p4), \
        ($PPIUnknown)&(p5) } )
#define $COM_AUTO_6( p1, p2, p3, p4, p5, p6 ) \
   RuntimeForStatic::$COMAutoArray $IDENT_AUTO($com_auto_array_)($, \
      { ($PPIUnknown)&(p1), ($PPIUnknown)&(p2), ($PPIUnknown)&(p3), ($PPIUnknown)&(p4), \
        ($PPIUnknown)&(p5), ($PPIUnknown)&(p6) } )
#define $COM_AUTO_7( p1, p2, p3, p4, p5, p6, p7 ) \
   RuntimeForStatic::$COMAutoArray $IDENT_AUTO($com_auto_array_)($, \
      { ($PPIUnknown)&(p1), ($PPIUnknown)&(p2), ($PPIUnknown)&(p3), ($PPIUnknown)&(p4), \
        ($PPIUnknown)&(p5), ($PPIUnknown)&(p6), ($PPIUnknown)&(p7) } )
#define $COM_AUTO_8( p1, p2, p3, p4, p5, p6, p7, p8 ) \
   RuntimeForStatic::$COMAutoArray $IDENT_AUTO($com_auto_array_)($, \
      { ($PPIUnknown)&(p1), ($PPIUnknown)&(p2), ($PPIUnknown)&(p3), ($PPIUnknown)&(p4), \
        ($PPIUnknown)&(p5), ($PPIUnknown)&(p6), ($PPIUnknown)&(p7), ($PPIUnknown)&(p8) } )
#define $COM_AUTO_9( p1, p2, p3, p4, p5, p6, p7, p8, p9 ) \
   RuntimeForStatic::$COMAutoArray $IDENT_AUTO($com_auto_array_)($, \
      { ($PPIUnknown)&(p1), ($PPIUnknown)&(p2), ($PPIUnknown)&(p3), ($PPIUnknown)&(p4), \
        ($PPIUnknown)&(p5), ($PPIUnknown)&(p6), ($PPIUnknown)&(p7), ($PPIUnknown)&(p8), \
        ($PPIUnknown)&(p9) } )
#define $COM_AUTO_10( p1, p2, p3, p4, p5, p6, p7, p8, p9, p10 ) \
   RuntimeForStatic::$COMAutoArray $IDENT_AUTO($com_auto_array_)($, \
      { ($PPIUnknown)&(p1), ($PPIUnknown)&(p2), ($PPIUnknown)&(p3), ($PPIUnknown)&(p4), \
        ($PPIUnknown)&(p5), ($PPIUnknown)&(p6), ($PPIUnknown)&(p7), ($PPIUnknown)&(p8), \
        ($PPIUnknown)&(p9), ($PPIUnknown)&(p10) } )

//==================================================================================================
