Collapse All
Parallels Virtualization SDK
ContentsIndex
PreviousUpNext
PRL_EVENT_HANDLER_PTR
Callback Prototypes

PRL_EVENT_HANDLER_PTR is a function prototype for implementing callback functions for use in asynchronous calls.

Syntax
typedef PRL_METHOD_PTR( PRL_EVENT_HANDLER_PTR ) ( PRL_HANDLE hEvent, PRL_VOID_PTR data );
Parameters

hEvent
A handle of type PHT_EVENT or PHT_JOB. The PHT_EVENT type indicates that the callback function was called by a system event. If the type is PHT_JOB then the callback function was called by an asynchronous job. The type can be determined using the PrlHandle_GetType function. For more information and code samples see Parallels Virtualization SDK Programmer's Guide

Note: You must always free the handle before exiting from the function regardless of whether you actually used it or not. Failure to do so will result in a memory leak.

data
A pointer to a buffer containing user-defined data.
 

Remarks

A pointer to a callback function can be passed to another function that accepts it as a parameter. The operation initiated by that function will be performed in the background thread, which will call the callback function (possibly more than once) passing to it intermediate results or the final result of the operation.

Links
© 2021 Parallels International GmbH. All rights reserved.