AoHold()

Updated: April 19, 2023

Increment the hold counter for a control

Synopsis:

#include <aoi.h>

int32_t AoHold(const AOICtrl_t *ctrl);

Arguments:

ctrl
A pointer to the AOICtrl_t structure for the control you want to hold.

Library:

libaoi.so

Description:

This function increments the hold counter for a control. If the control was previously not held and it represents a DLL, the DLL is loaded and initialized if necessary. You should hold a control before trying to use any of its interfaces, and release it with AoRelease() when you're finished using its interfaces.

There's also a global hold counter, which ensures DLLs are kept in memory even if no application is holding them; see the AoHoldAll() and AoReleaseAll() references for details.

Returns:

0 if successful, or -1 if an error occurred.

Classification:

QNX Neutrino