Click or drag to resize

ScsiAdapterCreateDevice Method (Int64, UInt32, Int64, DeviceFlags, String, Boolean, String, Boolean, UInt32)

Creates a new virtual disk.

Namespace:  Arsenal.ImageMounter
Assembly:  Arsenal.ImageMounter (in Arsenal.ImageMounter.dll) Version: 1.0.0.0 (3.4.140.0)
Syntax
public void CreateDevice(
	long DiskSize,
	uint BytesPerSector,
	long ImageOffset,
	DeviceFlags Flags,
	string Filename,
	bool NativePath,
	string WriteOverlayFilename,
	bool WriteOverlayNativePath,
	ref uint DeviceNumber
)

Parameters

DiskSize
Type: SystemInt64
Size of virtual disk. If this parameter is zero, current size of disk image file will automatically be used as virtual disk size.
BytesPerSector
Type: SystemUInt32
Number of bytes per sector for virtual disk geometry. This parameter can be zero in which case most reasonable value will be automatically used by the driver.
ImageOffset
Type: SystemInt64
A skip offset if virtual disk data does not begin immediately at start of disk image file. Frequently used with image formats like Nero NRG which start with a file header not used by Arsenal Image Mounter or Windows filesystem drivers.
Flags
Type: Arsenal.ImageMounterDeviceFlags
Flags specifying properties for virtual disk. See comments for each flag value.
Filename
Type: SystemString
Name of disk image file to use or create. If disk image file already exists, the DiskSize parameter can be zero in which case current disk image file size will be used as virtual disk size. If Filename parameter is Nothing/null disk will be created in virtual memory and not backed by a physical disk image file.
NativePath
Type: SystemBoolean
Specifies whether Filename parameter specifies a path in Windows native path format, the path format used by drivers in Windows NT kernels, for example \Device\Harddisk0\Partition1\imagefile.img. If this parameter is False path in Filename parameter will be interpreted as an ordinary user application path.
WriteOverlayFilename
Type: SystemString
Name of differencing image file to use for write overlay operation. Flags fields must also specify read-only device and write overlay operation for this field to be used.
WriteOverlayNativePath
Type: SystemBoolean
Specifies whether WriteOverlayFilename parameter specifies a path in Windows native path format, the path format used by drivers in Windows NT kernels, for example \Device\Harddisk0\Partition1\imagefile.img. If this parameter is False path in Filename parameter will be interpreted as an ordinary user application path.
DeviceNumber
Type: SystemUInt32
In: Device number for device to create. Device number must not be in use by an existing virtual disk. For automatic allocation of device number, pass ScsiAdapter.AutoDeviceNumber. Out: Device number for created device.
See Also