The AIDA_bAddToStack function links a component to an AIDA stack.
byte AIDA_bAddToStack(
handle hStack,
const xchar *xsName
);
AIDA_bAddToStack returns a value that is needed for configuring and removing the new stack component.
If the function fails, the returned value is AIDA_nInvalidStackLevel. The application can retrieve the error code using AIDA_iGetError.
The file system where the component to be loaded is stored may be case sensitive. So the optional path and filename must match the capitalization of the component's filename to keep the code portable.
The path to the component will not be stored in the stack configuration.
Attention: Stack manipulation functions and component configuration functions may not be called simultaneously from different threads with the same handle or otherwise will cause unpredictable results.
/* ADDCOMPONENT.C: This program adds an AIDA component to an existing stack.
*/
#include <stdio.h>
#include <errno.h>
#include "bsk_aida.h";
byte bAddComponent( handle hStack )
{
byte bStackLevel;
/* Add a component named "dummy" */
bStackLevel = AIDA_bAddToStack( hStack, "dummy" );
if( bStackLevel == 0 )
printf( "Error adding component \"dummy\": %d.\n", AIDA_iGetError() );
else
printf( "Component added. Stacklevel is %u.\n", (unsigned int)bStackLevel );
return bStackLevel;
}
Component added. StackLevel is 1.
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.
AIDA Overview, AIDA Stacks Licensing/Authentication Overview, AIDA Functions, AIDA_hCreateStack, AIDA_hCreateStackEx, AIDA_boDeleteStack, AIDA_boSaveStack, AIDA_hRestoreStack, AIDA_hRestoreStackRaw, AIDA_hRestoreStackEx, AIDA_pastSetReplacementTable, AIDA_boRemoveFromStack, AIDA_xsComponentName