Collapse All
Parallels Virtualization SDK
ContentsIndex
PreviousUpNext
PrlSrv_RegEventHandler Function
PHT_SERVER

Registers an event handler.

Syntax
PRL_RESULT PrlSrv_RegEventHandler(
    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 a user callback function (event handler).
userData
Optional. A pointer to a user data that will be passed to the callback function. 

 

Remarks

Asynchronous functions return data to the caller by means of a callback function (or event handler). The callback function could be called at any time, depending on how long the asynchronous function takes to complete. The callback function must have a specific signature. The callback function prototype type is PRL_EVENT_HANDLER_PTR. The PrlSrv_RegEventHandler function is used to register an event handler with the specified Parallels Service, PrlSrv_UnregEventHandler is used to unregister an event handler. When an event handler is registered, it will start receiving all events/jobs generated by the Parallels Service. It is the responsibility of the client application to identify and handle the relevant event(s). For more information on events and asynchronous functions, see the Parallels Virtualization SDK Programmer's Guide.

Links
© 2021 Parallels International GmbH. All rights reserved.