AIDA_boRemoveFromStack

The AIDA_boRemoveFromStack function removes a component from an AIDA stack.

bool AIDA_boRemoveFromStack(
  handle hStack,
  byte bLevel
);

Parameters

hStack
Handle to a stack previously created by AIDA_hCreateStack, AIDA_hCreateStackEx, AIDA_hRestoreStack, AIDA_hRestoreStackRaw or AIDA_hRestoreStackEx.
bLevel
Stacklevel of the component to be unloaded

Return Values

AIDA_boRemoveFromStack returns True on success.

If the requested component could not be removed from the stack, the function returns False. The application can retrieve the error code using AIDA_iGetError.

Remarks

AIDA_boRemoveFromStack also removes all components being added after the requested component specified by bLevel.

Example

/* UNLOADCOMPONENT.C: This program removes a component of an existing stack.
 */

#include <stdio.h>
#include <errno.h>
#include "bsk_aida.h";

bool boRemoveComponent( handle hStack, byte bLevel )
{
  /* Unload a component */
  if( !AIDA_boRemoveFromStack( hStack, bLevel ) )
  {
    printf( "Error removing a component: %d!\n", AIDA_iGetError() );
    return False;
  }
  else
    printf( "Component successfully removed.\n" );
  return True;
}

Output

Component successfully removed.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Linux: Requires a kernel supporting ELF binaries.
  Header: Declared in bsk_aida.h, also requires portab.h.
  Import Library (Windows): Use BSK_AIDA.lib.

See Also

AIDA Overview, AIDA Functions, AIDA_hCreateStack, AIDA_hCreateStackEx, AIDA_boDeleteStack, AIDA_boSaveStack, AIDA_hRestoreStack, AIDA_hRestoreStackRaw, AIDA_hRestoreStackEx, AIDA_pastSetReplacementTable, AIDA_bAddToStack, AIDA_xsComponentName