Collapse All
Parallels Virtualization SDK
ContentsIndex
PreviousUpNext
PrlDisk_CreateDisk_Local Function
PHT_VIRTUAL_DISK  See Also

This function can be used to create a new virtual disk locally without being connected to the Parallels Service.

Syntax
PRL_RESULT PrlDisk_CreateDisk_Local(
    PRL_HANDLE_PTR pHandle, 
    PRL_CONST_STR pDiskName, 
    PRL_CONST_DISK_PARAMETERS_PTR pParams, 
    const PRL_DISK_CALLBACK pCallback, 
    PRL_CONST_VOID_PTR pAdditional
);
File

PrlDisk.h

Parameters

pHandle
[out] A handle of type PHT_VIRTUAL_DISK identifying the new virtual disk. You must always free the handle using the PrlDisk_Free function when the handle is no longer needed. Failure to do so will result in memory leak.
pDiskName
Disk name in UTF-8 format.
pParams
Disk configuration parameters.
pCallback
A pointer to a callback function or NULL pointer. This parameter allows to call the function asynchronously. If this parameter contains a pointer to a user-implemented callback function, the PrlDisk_CreateDisk function will return immediately and the operation will continue in the background thread. The background thread will be calling the callback function passing the operation progress information to it. See PRL_DISK_CALLBACK for more information. Using a callback might be helpful when the disk creation is expected to take a long time. For example, you may want to use a callback when you are creating a large disk and allocating all space for it right away. 

If this parameter contains a NULL pointer, the function will be called synchronously.

pAdditional
A pointer to a buffer containing user-defined data to pass to the callback function.

Returns

PRL_RESULT. Possible values: 

PRL_ERR_INVALID_ARG - invalid argument values. 

PRL_ERR_SUCCESS - function completed successfully. 

Remarks

The function creates a new virtual disk and obtains a handle of type PHT_VIRTUAL_DISK identifying the new disk. The handle can then be used to perform other operations on the disk if necessary (see other functions from this group). If you would like to create a new virtual disk on a remote host, use the PrlDisk_CreateDisk function.

See Also
Links
© 2021 Parallels International GmbH. All rights reserved.