ResizeVirtualDisk function (virtdisk.h)

Resizes a virtual disk.

Syntax

DWORD ResizeVirtualDisk(
  [in]           HANDLE                          VirtualDiskHandle,
  [in]           RESIZE_VIRTUAL_DISK_FLAG        Flags,
  [in]           PRESIZE_VIRTUAL_DISK_PARAMETERS Parameters,
  [in, optional] LPOVERLAPPED                    Overlapped
);

Parameters

[in] VirtualDiskHandle

Handle to an open virtual disk.

[in] Flags

Zero or more flags enumerated from the RESIZE_VIRTUAL_DISK_FLAG enumeration.

[in] Parameters

Address of a RESIZE_VIRTUAL_DISK_PARAMETERS structure containing the new size of the virtual disk.

[in, optional] Overlapped

If this is to be an asynchronous operation, the address of a valid OVERLAPPED structure.

Return value

Status of the request.

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is an error code. For more information, see System Error Codes.

Requirements

Requirement Value
Minimum supported client Windows 8
Minimum supported server Windows Server 2012
Target Platform Windows
Header virtdisk.h (include Windows.h)
Library VirtDisk.lib
DLL VirtDisk.dll

See also

RESIZE_VIRTUAL_DISK_FLAG

RESIZE_VIRTUAL_DISK_PARAMETERS

VHD Functions