IOCTL_DISK_GETNAME (Windows CE 5.0)

Send Feedback

This IOCTL services the request from the FAT file system for the name of the folder that determines how users access the block device. If the driver does not supply a name, the FAT file system uses the default name passed to it by the file system. The DeviceIoControl function processes this IOCTL.

Parameters

  • hDevice
    [in] Handle to the block device.
  • dwIoControlCode
    [in] Specifies this IOCTL.
  • lpInBuffer
    [in] Set to NULL.
  • nInBufferSize
    [in] Set to zero.
  • lpOutBuffer
    [out] Specifies 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
    [out] Specifies the size of lpOutBuffer. Always set to MAX_PATH where MAX_PATH includes the terminating NULL character.
  • lpBytesReturned
    [out] Set by the device driver to the length of the returned string and also the terminating NULL character.
  • lpOverlapped
    [in] Set to NULL.

Return Values

If returns TRUE, the IOCTL was successfully processed; otherwise, returns FALSE.

Remarks

In Windows CE 3.0, this IOCTL was changed from DISK_IOCTL_GETNAME to IOCTL_DISK_GETNAME.

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 queries for a name each time a new block device is connected. The block device driver can supply the same name for each query or it can use different names. The FAT file system appends a number to the folder name if the supplied name is the same as an existing folder name. However, the FAT file system makes limited attempts to create a folder for the block device. If the block device driver does not support this IOCTL, all block device connected from the block device driver use the default name for the file system. A block device driver cannot use the name Storage Card, which is reserved. If you use this name, the request to connect the volume fails. Platforms that use languages other than English may have a different reserved folder name for block devices.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Diskio.h.

See Also

Block Drivers | DeviceIoControl

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.