Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
QNX Documentation Library
ApAddContext

ApAddContext

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

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