#include <lvm_intr.h> void _System Assign_Drive_Letter( ADDRESS Volume_Handle, /* (I) Handle of the volume whose drive letter is to be changed/set */ char New_Drive_Preference, /* (I) The new drive letter to be assigned to the volume */ CARDINAL32 * Error_Code /* (O) Address where the error code will be stored */ );
Parameters
Specifying a non-alphabetic character will cause the volume to be assigned no drive letter. A volume with no drive letter is said to be 'hidden'; removing a volume's drive letter in this way therefore has the same effect as calling the Hide_Volume function on the volume in question.
Returns
N/A.
Errors
If the requested drive letter assignment cannot be made, the volume will not be altered.
If Volume_Handle is not a valid handle, a trap may result.
If Volume_Handle is a partition or drive handle, then this function will abort and an error condition will occur.
In the event of an error, the value pointed to by Error_Code will be greater than 0.
Side Effects
A volume may have its drive letter assignment changed.
Notes
If the drive letter being assigned is already in use by a volume which does not lie on removable media, then the drive letter assignment will not be made.
If the drive letter assignment is changed successfully, it will be reflected immediately in the Drive_Letter_Preference field of the Volume_Information_Record associated with the volume (as returned by any subsequent call to Get_Volume_Information). However, the Current_Drive_Letter field of the same structure will contain a null ('\0') character until the next time the Commit_Changes function is called.
16-Bit Equivalent:
void _Far16 _Pascal _loadds ASSIGN_DRIVE_LETTER16( CARDINAL32 Volume_Handle, char New_Drive_Preference, CARDINAL32 * _Seg16 Error_Code );