3.2.4.4.3.20 IVolumeClient3::FreeDriveLetter (Opnum 23)

The FreeDriveLetter method unassigns a specified drive letter from a volume, partition, or logical drive on the server.<201>

 HRESULT FreeDriveLetter(
   [in] wchar_t letter,
   [in] unsigned long forceOption,
   [in] hyper letterLastKnownState,
   [in] LdmObjectId storageId,
   [in] hyper storageLastKnownState,
   [out] TASK_INFO* tinfo
 );

letter: Drive letter to free.

forceOption: Boolean value that indicates whether to force the freeing of a drive letter. This call will fail if some other application has the volume locked.

Value

Meaning

NO_FORCE_OPERATION

0

If the specified drive letter is assigned to a volume, partition, or logical disk that is in use, contains the paging file, or contains the system directory, the operation fails and returns an error.

FORCE_OPERATION

1

The specified drive letter is always freed.

letterLastKnownState: Drive letter's last known modification sequence number.

storageId: Specifies the object identifier of the volume, partition, or logical drive to which the letter is assigned.

storageLastKnownState: Last known modification sequence number of the volume, partition, or logical drive to which the drive letter is assigned.

tinfo: Pointer to a TASK_INFO structure that the client can use to track the request's progress.

Return Values: The method MUST return 0 or a nonerror HRESULT on success, or an implementation-specific nonzero error code on failure (as specified in [MS-ERREF]; see also section 2.2.1 for HRESULT values predefined by the Disk Management Remote Protocol).

When the server receives an IVolumeClient3::FreeDriveLetter message, it MUST process that message, as specified in IVolumeClient::FreeDriveLetter (section 3.2.4.4.1.20).