Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
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.
![]() |
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
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)
