Collapse All
Parallels Virtualization SDK
PrlSrv_UnregEventHandler Function
PHT_SERVER

Unregisters the specified event handler (callback function) that was previously registered with the PrlSrv_RegEventHandler function.

Syntax
PRL_RESULT PrlSrv_UnregEventHandler(
    PRL_HANDLE hServer, 
    PRL_EVENT_HANDLER_PTR handler, 
    PRL_VOID_PTR userData
);
File

PrlApiDisp.h

Parameters

hServer
A handle of type PHT_SERVER identifying the Parallels Service.
handler
A pointer to the callback function (event handler) to unregister. This must be the same pointer that was passed to the PrlSrv_RegEventHandler when the event handler was registered with the virtual machine.
userData
A pointer to the user data. This must also be the same pointer that was passed to the PrlSrv_RegEventHandler when the event handler was registered with the virtual machine.
Returns

PRL_RESULT . Possible values:

PRL_ERR_INVALID_ARG - invalid handle or null pointer was passed.

PRL_ERR_SUCCESS - function completed successfully.

Remarks

When using callback functionality with asynchronous functions, a callback function is first registered with Parallels Service. When no longer needed (client doesn't want to receive events anymore), the function must by unregistered using the PrlSrv_UnregEventHandler function. The values of the handler and userData parameters constitute a unique pair which will be used to identify the event handler that will be unregistered. Make sure that you supply the same values as the ones you used when you registered the handler. See PrlSrv_SubscribeToHostStatistics for the complete example illustrating event handlers usage.

Links
Copyright © 1999-2017 Parallels International GmbH. All rights reserved.