The fsVarsUnregisterVarsStatusUpdateHandler function can be used to unregister a handler previously registered with fsVarsRegisterVarsStatusUpdateHandler.

Syntax
FsVarError fsVarsUnregisterVarsStatusUpdateHandler(
    FsVarsStatusUpdateHandler handler,
    void* pUserParam,
    bool bUseObjIdSpecialValue
);
Parameters
ParametersDescription
handlerThe pointer to the function that was registered as the handler.
pUserParamThe pointer to the user parameter that was given when the handler was registered.
bUseObjIdSpecialValueWhether 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 has been unregistered).

Example
void handler(FsVarTypeFlags 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
    }
}

0/255