fsVarsUnregisterVarsStatusUpdateHandler
The fsVarsUnregisterVarsStatusUpdateHandler function can be used to unregister a handler previously registered with fsVarsRegisterVarsStatusUpdateHandler.
Syntax
FsVarError fsVarsUnregisterVarsStatusUpdateHandler(
FsVarsStatusUpdateHandler handler,
void* pUserParam,
bool bUseObjIdSpecialValue
);
Parameters
| Parameters | Description |
|---|---|
handler |
The pointer to the function that was registered as the handler. |
| pUserParam | The pointer to the user parameter that was given when the handler was registered. |
| bUseObjIdSpecialValue |
Whether the handler used special values for object IDs or not. Default: true |
Return Values
The function returns FsVarError, where 0 means there is no error (in which case the handler will be called each time the simulation needs to notify a change in the variables).
Example
void handler(FsVarsTypeFlags varsUpdated, FsVarUpdateOp op, FsObjectId objId, void* pUserParam)
{
// Process variables status update
}
extern "C" MSFS_CALLBACK void module_deinit()
{
FsVarError err = fsVarsUnregisterVarsStatusUpdateHandler(handler, pUserData, true);
if (err != FS_VAR_ERROR_NONE)
{
// Error
}
}
Related Topics