Name

VixDiskLib_Open

Description

VixError
VixDiskLib_Open(const VixDiskLibConnection connection,
                const char *path,
                uint32 flags,
                VixDiskLibHandle *diskHandle);

This function opens a virtual disk.

Parameters

connection
A valid VixDiskLib connection.
path
Path to the virtual disk file. If you want to open a disk that is part of a snapshot, specify the name of the disk as referenced by the snapshot.
flags
Bitwise or'ed combination of VIXDISKLIB_FLAG_OPEN_UNBUFFERED, VIXDISKLIB_FLAG_OPEN_SINGLE_LINK and VIXDISKLIB_FLAG_OPEN_READ_ONLY. If VixDiskLib_ConnectEx() was called with the readOnly parameter true, the virtual disk is opened read-only even without the VIXDISKLIB_FLAG_OPEN_READ_ONLY flag.
diskHandle
Pointer to the opened diskHandle. This is an output parameter.

Return Value

VIX_OK if the function succeeded, otherwise an appropriate VIX error code.

Remarks

Example

   vixError = VixDiskLib_Open(appGlobals.connection,
                              appGlobals.diskPath,
                              appGlobals.openFlags,
                              &srcHandle);

Copyright (C) 2007-2015 VMware, Inc. All rights reserved.