IOCTL_DISK_UPDATE_PROPERTIES IOCTL

Invalidates the cached partition table and re-enumerates the device.

To perform this operation, call the DeviceIoControl function with the following parameters.

C++
BOOL DeviceIoControl(
  (HANDLE) hDevice,            // handle to device
  IOCTL_DISK_UPDATE_PROPERTIES,// dwIoControlCodeNULL,                        // lpInBuffer0,                           // nInBufferSizeNULL,                        // lpOutBuffer0,                           // nOutBufferSize(LPDWORD)lpBytesReturned,    // lpBytesReturned(LPDWORD) lpOverlapped       // lpOverlapped);

Major Code

IRP_MJ_DEVICE_CONTROL

Input Buffer

Input Buffer Length

Output Buffer

Output Buffer Length

Input / Output Buffer

Input / Output Buffer Length

Status Block

Irp->IoStatus.Status is set to STATUS_SUCCESS if the request is successful.

Otherwise, Status to the appropriate error condition as a NTSTATUS code.

For more information, see NTSTATUS Values.

Remarks

This operation is used in synchronizing the system view of the specified disk device when the partition table of the disk is directly modified. Be sure to perform this operation when you update the usable space for a disk so that the system will update its partition table.

You can update the properties of a live volume, and the volume can be open for sharing during the update operation.

You do not need to lock a volume that you are updating, nor do you need to shut down other applications or services during the update operation.

Requirements

   
Windows version Windows XP [desktop apps only] Windows Server 2003 [desktop apps only]
Header winioctl.h (include Windows.h)

See Also

DeviceIoControl

Disk Management Control Codes