Data Transformation Engine Functions and Expressions Reference Guide
Chapter 3 - Function Reference EXIT
Functions and Expressions Reference Guide
101
unsigned int i;
char *syms[] = { "bin2hex", "AIXEntry" };
void *adr[] = { (void *)bin2hex, (void *)AIXEntry};
void AIXEntry(LPEXITPARAM lpInputStruct)
{
printf("AIXEntry called\n");
for (i = 0; i < (sizeof(syms)) / (sizeof(char *)); i++)
if ( !(strcmp(lpInputStruct->szFile, syms[i])) ) {
lpInputStruct->lpv = adr[i];
break;
}
}
void bin2hex(LPEXITPARAM lpInputStruct)
{
printf("bin2hex called\n");
printf("argument to library function: %s\n",lpInputStruct-
>lpszCmdLine);
lpInputStruct->nReturn = 0;
}
To build this shared library, run the following commands:
cc -c share1.c
cc -o mcshex.so share1.o -bE:shrsub.exp -bM:SRE -eAIXEntry
Returns
This function returns a single-text-item.
Set lpep->nReturn equal to
0 if the function is to succeed or set it equal to 1
to fail.
For detailed information on the requirements of the library function that is
executed by the
EXIT, see Chapter 4 - Implementing a Library EXIT Function.
Meaning 2 - Program Method
Note The Program method of the EXIT function is not supported on Windows platforms.
EXIT ( program_name , command_line_arg1 , command_line_arg2 )