Updated: October 28, 2024 |
Find the next interface and hold its control
#include <aoi.h> const AOICtrl_t *AoIterateHoldGet(const char *iname, const int32_t version, int32_t *cookie, void **iface);
This function iterates through all available AOI controls, returning each one that has an interface with the given name and minimum version and that could be held. When you first call this function, you should set cookie to point to a zero value. You can then keep calling this function until it returns the control you're looking for, or it returns NULL, which means there are no more controls.
If name is NULL, AoIterateHoldGet() returns the next control in the global list that could be held, without considering the name or version of any of its interfaces.
This is a convenience function that combines AoIterate(), AoHold(), and AoGetInterface(). You must release each control at some point, or you will end up with an incorrect hold count and the DLLs won't be automatically unloaded.
When the function succeeds, meaning that a control with a matching interface could be held, the iface value points to the interface.
For the first call, a pointer to an AOICtrl_t structure for the first control containing an interface that matches the name and version values. Subsequent calls return the next control with such an interface, until there are no more controls, at which point the function returns NULL.
QNX Neutrino