Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ap/apaddcontext.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ap/apaddcontext.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ap/apaddcontext.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ap/apaddcontext.html on line 8

ApAddContext()

Add a PhAB context so you can use a PhAB application as a DLL

Synopsis:

#include <Ap.h>

int ApAddContext( ApContext_t *context,
                  const char *exe_path );

Arguments:

context
A pointer to the context to add. This argument should be the address of AbContext, a global data structure that PhAB puts in abmain.c.
exe_path
The full path of the DLL, suitable for passing to open().

Library:

Ap

Description:

This function adds a PhAB context so you can use a PhAB application as a DLL.

Returns:

0 on success, or -1 if there wasn't enough memory or ApAddClass() failed.


Note: Don't call any Ap* functions if ApAddContext() fails.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

ApAddClass(), ApRemoveContext()

Making a DLL out of a PhAB application in the Generating, Compiling, and Running Code chapter of the Photon Programmer's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ap/apaddcontext.html on line 126

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ap/apaddcontext.html on line 126