RawSCSIVirtualDisk function (virtdisk.h)

Issues an embedded SCSI request directly to a virtual hard disk.

Syntax

DWORD RawSCSIVirtualDisk(
  [in]  HANDLE                                  VirtualDiskHandle,
  [in]  const PRAW_SCSI_VIRTUAL_DISK_PARAMETERS Parameters,
  [in]  RAW_SCSI_VIRTUAL_DISK_FLAG              Flags,
  [out] PRAW_SCSI_VIRTUAL_DISK_RESPONSE         Response
);

Parameters

[in] VirtualDiskHandle

A handle to an open virtual disk. For information on how to open a virtual disk, see the OpenVirtualDisk function. This handle may also be a handle to a Remote Shared Virtual Disk. For information on how to open a Remote Shared Virtual Disk, see the Remote Shared Virtual Disk Protocol documentation.

[in] Parameters

A pointer to a valid RAW_SCSI_VIRTUAL_DISK_PARAMETERS structure that contains snapshot deletion data.

[in] Flags

SCSI virtual disk flags, which must be a valid combination of the RAW_SCSI_VIRTUAL_DISK_FLAG enumeration.

[out] Response

A pointer to a RAW_SCSI_VIRTUAL_DISK_RESPONSE structure that contains the results of processing the SCSI command.

Return value

Status of the request.

If the function succeeds, the return value is ERROR_SUCCESS.

A return of ERROR_SUCCESS only means the request was received by the virtual disk. The SCSI command itself could have failed due to an invalid device state, an unsupported SCSI command, or another error.

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 10 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Target Platform Windows
Header virtdisk.h
Library VirtDisk.lib
DLL VirtDisk.dll