DISK_IOCTL_GETNAME

Block device drivers respond to this I/O control code to service the FAT file system's request for the name of the folder that the block device should be accessed as by end users. If the driver does not supply a name then the FAT file system will use the default name passed to it by FileSys.exe.

Parameters

hDevice
Handle to the block device.
dwIoControlCode
IOCTL_DISK_GETNAME
lpInBuffer
NULL
nInBufferSize
0
lpOutBuffer
A buffer allocated by the file system driver. The device driver fills this buffer with the folder name. The folder name must be a unicode string.
nOutBufferSize
Set to the size of lpOutBuffer. This is always set to MAX_PATH where MAX_PATH includes the terminating NULL character.
lpBytesReturned
Must be set by the device driver to the length of the returned string plus the terminating NULL character.
lpOverlapped
NULL

Remarks

The block device driver should fill the lpOutBuffer buffer with a unicode string that represents the folder name to use for the block device. The FAT file system will query for a name each time a new block device is mounted. The block device driver can supply the same name for each query or can use different names. The FAT file system will append a number to the folder name if the supplied name is the same as an existing folder name. However, the FAT file system will only make a limited number of different attempts to create a folder for the block device. If the block device driver does not support this I/O control code, then the system's default name is used for all block devices mounted from the block device driver. A block device driver cannot use the name “Storage Card”; that name is reserved. If this name is returned then the request to mount the volume will fail. Windows CE platforms that use languages other than English may have a different reserved folder name for block devices.