Collapse All
Parallels C API Reference Guide
PrlDisk_CreateDisk_Local Function
PrlDisk.h PHT_VIRTUAL_DISK See Also Send Feedback

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
Parameters

pHandle
[out] A handle of type PHT_VIRTUAL_DISK identifying the new virtual disk.
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
Copyright (c) 1999-2008 Parallels Software International Inc.
What do you think about this topic? Send feedback!