Validates the specified section of a virtual machine configuration.
PRL_HANDLE PrlVm_ValidateConfig( PRL_HANDLE hVm, PRL_VM_CONFIG_SECTIONS nSection );
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.
When creating or modifying a virtual machine configuration, this function can be used to verify that a particular section of the configuration is valid. Use this function before sending the virtual machine object containing the configuration information to the Parallels Service. If the configuration is valid, you can commit the changes. If the configuration is not valid, make the necessary modifications and retry.
To get the return code from the PHT_JOB object, use the PrlJob_GetRetCode function. Possible values are:
PRL_ERR_INVALID_ARG - invalid handle or the specified configuration section doesn't exist.
PRL_ERR_PARSE_VM_CONFIG - error parsing configuration data.
PRL_ERR_VMCONF_VALIDATION_FAILED - invalid configuration; the description of the problem can be retrieved from from the PHT_JOB object (see below).
PRL_ERR_SUCCESS - specified configuration is valid.
In the event of validation failure, the PHT_JOB object will contain the description of the problem. To get the description: