Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

VBOXDDU_DECL ( int   )  const

Creates a new base image file.

Returns:
VBox status code.
Parameters:
pszFilename Name of the image file to create.
enmType Image type, only base image types are acceptable.
cbSize Image size in bytes.
pszComment Pointer to image comment. NULL is ok.
pfnProgress Progress callback. Optional. NULL if not to be used.
pvUser User argument for the progress callback.
Creates a differencing dynamically growing image file for specified parent image.

Returns:
VBox status code.
Parameters:
pszFilename Name of the differencing image file to create.
pszParent Name of the parent image file. May be base or diff image type.
pszComment Pointer to image comment. NULL is ok.
pfnProgress Progress callback. Optional. NULL if not to be used.
pvUser User argument for the progress callback.
Checks if image is available and not broken, returns some useful image parameters if requested.

Returns:
VBox status code.
Parameters:
pszFilename Name of the image file to check.
puVersion Where to store the version of image. NULL is ok.
penmType Where to store the type of image. NULL is ok.
pcbSize Where to store the size of image in bytes. NULL is ok.
pUuid Where to store the uuid of image creation. NULL is ok.
pParentUuid Where to store the uuid of the parent image (if any). NULL is ok.
pszComment Where to store the comment string of image. NULL is ok.
cbComment The size of pszComment buffer. 0 is ok.
Changes an image's comment string.

Returns:
VBox status code.
Parameters:
pszFilename Name of the image file to operate on.
pszComment New comment string (UTF-8). NULL is allowed to reset the comment.
Deletes a valid image file. Fails if specified file is not an image.

Returns:
VBox status code.
Parameters:
pszFilename Name of the image file to check.
Makes a copy of image file with a new (other) creation uuid.

Returns:
VBox status code.
Parameters:
pszDstFilename Name of the image file to create.
pszSrcFilename Name of the image file to copy from.
pszComment Pointer to image comment. If NULL, the comment will be copied from the source image.
pfnProgress Progress callback. Optional. NULL if not to be used.
pvUser User argument for the progress callback.
Converts image file from older VDI formats to current one.

Returns:
VBox status code.
Parameters:
pszFilename Name of the image file to convert.
pfnProgress Progress callback. Optional. NULL if not to be used.
pvUser User argument for the progress callback.
Shrinks growing image file by removing zeroed data blocks.

Returns:
VBox status code.
Parameters:
pszFilename Name of the image file to shrink.
pfnProgress Progress callback. Optional. NULL if not to be used.
pvUser User argument for the progress callback.
Queries the image's UUID and parent UUIDs.

Returns:
VBox status code.
Parameters:
pszFilename Name of the image file to operate on.
pUuid Where to store image UUID (can be NULL).
pModificationUuid Where to store modification UUID (can be NULL).
pParentUuuid Where to store parent UUID (can be NULL).
pParentModificationUuid Where to store parent modification UUID (can be NULL).
Changes the image's UUID and parent UUIDs.

Returns:
VBox status code.
Parameters:
pszFilename Name of the image file to operate on.
pUuid Optional parameter, new UUID of the image.
pModificationUuid Optional parameter, new modification UUID of the image.
pParentUuuid Optional parameter, new parent UUID of the image.
pParentModificationUuid Optional parameter, new parent modification UUID of the image.
Merges two images having a parent/child relationship (both directions).

Returns:
VBox status code.
Parameters:
pszFilenameFrom Name of the image file to merge from.
pszFilenameTo Name of the image file to merge into.
pfnProgress Progress callback. Optional. NULL if not to be used.
pvUser User argument for the progress callback.
Opens an image file.

The first opened image file in a HDD container must have a base image type, others (next opened images) must be a differencing or undo images. Linkage is checked for differencing image to be in consistence with the previously opened image. When a next differencing image is opened and the last image was opened in read/write access mode, then the last image is reopened in read-only with deny write sharing mode. This allows other processes to use images in read-only mode too.

Note that the image can be opened in read-only mode if a read/write open is not possible. Use VDIDiskIsReadOnly to check open mode.

Returns:
VBox status code.
Parameters:
pDisk Pointer to VDI HDD container.
pszFilename Name of the image file to open.
fOpen Image file open mode, see VDI_OPEN_FLAGS_* constants.
Creates and opens a new differencing image file in HDD container. See comments for VDIDiskOpenImage function about differencing images.

Returns:
VBox status code.
Parameters:
pDisk Pointer to VDI HDD container.
pszFilename Name of the image file to create and open.
pszComment Pointer to image comment. NULL is ok.
pfnProgress Progress callback. Optional. NULL if not to be used.
pvUser User argument for the progress callback.
Commits last opened differencing/undo image file of the HDD container to previous image. If the previous image file was opened in read-only mode (that must be always so) it is reopened as read/write to do commit operation. After successfull commit the previous image file again reopened in read-only mode, last opened image file is cleared of data and remains open and active in HDD container. If you want to delete image after commit you must do it manually by VDIDiskCloseImage and VDIDeleteImage calls.

Note that in case of unrecoverable error all images of HDD container will be closed.

Returns:
VBox status code.
Parameters:
pDisk Pointer to VDI HDD container.
pfnProgress Progress callback. Optional.
pvUser User argument for the progress callback.
Get virtual disk PCHS geometry stored in image file.

Returns:
VBox status code.

VERR_VDI_NOT_OPENED if no one VDI image is opened in HDD container.

VERR_VDI_GEOMETRY_NOT_SET if no geometry present in the HDD container.

Parameters:
pDisk Pointer to VDI HDD container.
pPCHSGeometry Where to store PCHS geometry. Not NULL.
Store virtual disk PCHS geometry into base image file of HDD container.

Note that in case of unrecoverable error all images of HDD container will be closed.

Returns:
VBox status code.

VERR_VDI_NOT_OPENED if no one VDI image is opened in HDD container.

Parameters:
pDisk Pointer to VDI HDD container.
pPCHSGeometry Where to store LCHS geometry. Not NULL.
Get virtual disk LCHS geometry stored in image file.

Returns:
VBox status code.

VERR_VDI_NOT_OPENED if no one VDI image is opened in HDD container.

VERR_VDI_GEOMETRY_NOT_SET if no geometry present in the HDD container.

Parameters:
pDisk Pointer to VDI HDD container.
pLCHSGeometry Where to store LCHS geometry. Not NULL.
Store virtual disk LCHS geometry into base image file of HDD container.

Note that in case of unrecoverable error all images of HDD container will be closed.

Returns:
VBox status code.

VERR_VDI_NOT_OPENED if no one VDI image is opened in HDD container.

Parameters:
pDisk Pointer to VDI HDD container.
pLCHSGeometry Where to store LCHS geometry. Not NULL.
Get number of opened images in HDD container.

Returns:
Number of opened images for HDD container. 0 if no images has been opened.
Parameters:
pDisk Pointer to VDI HDD container.
Get version of opened image of HDD container.

Returns:
VBox status code.

VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to VDI HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
puVersion Where to store the image version.
Get type of opened image of HDD container.

Returns:
VBox status code.

VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to VDI HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
penmType Where to store the image type.
Get flags of opened image of HDD container.

Returns:
VBox status code.

VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to VDI HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pfFlags Where to store the image flags.
Get filename of opened image of HDD container.

Returns:
VBox status code.

VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened.

VERR_BUFFER_OVERFLOW if pszFilename buffer too small to hold filename.

Parameters:
pDisk Pointer to VDI HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pszFilename Where to store the image file name.
cbFilename Size of buffer pszFilename points to.
Get the comment line of opened image of HDD container.

Returns:
VBox status code.

VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened.

VERR_BUFFER_OVERFLOW if pszComment buffer too small to hold comment text.

Parameters:
pDisk Pointer to VDI HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pszComment Where to store the comment string of image. NULL is ok.
cbComment The size of pszComment buffer. 0 is ok.
Get Uuid of opened image of HDD container.

Returns:
VBox status code.

VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to VDI HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pUuid Where to store the image creation uuid.
Get last modification Uuid of opened image of HDD container.

Returns:
VBox status code.

VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to VDI HDD container.
nImage Image number, counts from 0. 0 is always base image of container.
pUuid Where to store the image modification uuid.
Get Uuid of opened image's parent image.

Returns:
VBox status code.

VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened.

Parameters:
pDisk Pointer to VDI HDD container.
nImage Image number, counts from 0. 0 is always base image of the container.
pUuid Where to store the image creation uuid.
Read data from virtual HDD.

Returns:
VBox status code.
Parameters:
pDisk Pointer to VDI HDD container.
offStart Offset of first reading byte from start of disk.
pvBuf Pointer to buffer for reading data.
cbToRead Number of bytes to read.
Write data to virtual HDD.

Returns:
VBox status code.
Parameters:
pDisk Pointer to VDI HDD container.
offStart Offset of first writing byte from start of HDD.
pvBuf Pointer to buffer of writing data.
cbToWrite Number of bytes to write.


Generated by  Doxygen 1.6.0   Back to index