Allows to subscribe to periodicaly receive virtual machine perfomance statistics.
PRL_HANDLE PrlVm_SubscribeToPerfStats( PRL_HANDLE hVm, PRL_CONST_STR sFilter );
PrlApiVm.h
A handle of type PHT_JOB containing the results of this asynchronous operation or PRL_INVALID_HANDLE if there's not enough memory to instantiate the job object.
To obtain statistics, an event handler (callback function) is required. Within the event handler, first check the type of event. Events of type PET_DSP_EVT_VM_PERFSTATS indicate an event containing statistics data. The perfomace statistics repesented by parameters of Event object (a handle of type PHT_EVENT).
For the event handler to be called, it is necessary to register it with PrlSrv_RegEventHandler. When statistics data is no longer required, unsubscribe from statistics events using PrlVm_UnsubscribeFromHostPerfStats. When events are no longer required, unregister the event handler using PrlVm_UnregEventHandler.
If method is called mutliple times, the 'filter' value is updated each time on the Parallels Service side.
To get the return code from the PHT_JOB object, use the PrlJob_GetRetCode function. Possible values are:
PRL_ERR_INVALID_ARG - invalid handle was passed.
PRL_ERR_SUCCESS - function completed successfully.