Synopsis
void *OMret_omx_ptr(
OMobj_id object_id,
0);
Description
OMret_omx_ptr returns a pointer to the C++ object associated with the AVS/Express object object_id. You use this routine when you have an existing AVS/Express object that you want to manipulate with the C++ API.
This C++ object returned is a pointer to an OMXgroup.
In order for this routine to be used, the system must have a compiled definition of a C++ class corresponding to the object and the object must be in the same process as the code calling this routine.
C++ classes are generated for objects that have the export_cxx property set or for modules that have a cxxmethod.
Arguments
object_id
The object whose C++ class is returned.
0
The second argument must be 0.
Returned value
This routine returns a pointer to a C++ object of type OMXgroup. The OMXgroup class supports a method called OMXgroup::ret_omx_ptr that you must use to convert this pointer to a pointer of a more specific class.
If there is not an existing C++ object associated with the object specified, but AVS/Express does have a class associated with this object (or a template object that this object was created from), a new C++ object is created and a pointer to this newly created object is returned. If there is no defined class associated with this object, an error message is printed and a NULL pointer is returned.
You should not delete the object returned to you by this routine. It is deleted by AVS/Express when the object is destroyed.