Click or drag to resize
ImDiskAPICreateDevice Method (Int64, UInt32, UInt32, UInt32, Int64, ImDiskFlags, String, Boolean, String, UInt32, IntPtr)
Creates a new ImDisk virtual disk.

Namespace: LTR.IO.ImDisk
Assembly: ImDiskNet (in ImDiskNet.dll) Version: 1.0.0.0 (1.0.007.0)
Syntax
public static void CreateDevice(
	long DiskSize,
	uint TracksPerCylinder,
	uint SectorsPerTrack,
	uint BytesPerSector,
	long ImageOffset,
	ImDiskFlags Flags,
	string Filename,
	bool NativePath,
	string MountPoint,
	ref uint DeviceNumber,
	IntPtr StatusControl
)

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.
TracksPerCylinder
Type: SystemUInt32
Number of tracks per cylinder for virtual disk geometry. This parameter can be zero in which case most reasonable value will be automatically used by the driver.
SectorsPerTrack
Type: SystemUInt32
Number of sectors per track for virtual disk geometry. This parameter can be zero in which case most reasonable value will be automatically used by the driver.
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 ImDisk or Windows filesystem drivers.
Flags
Type: LTR.IO.ImDiskImDiskFlags
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 paramter 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.
MountPoint
Type: SystemString
Mount point in the form of a drive letter and colon to create for newly created virtual disk. If this parameter is Nothing/null the virtual disk will be created without a drive letter.
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 UInt32.MaxValue. Out: Device number for created device.
StatusControl
Type: SystemIntPtr
Optional handle to control that can display status messages during operation.
See Also