Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.03 KB

File metadata and controls

43 lines (30 loc) · 1.03 KB

Home

Setting the volume label

Before you begin:

See also:


Code:

DECLARE INTEGER GetLastError IN kernel32

DECLARE INTEGER SetVolumeLabel IN kernel32;
	STRING lpRootPathName, STRING lpVolumeName

IF SetVolumeLabel ("A:\", "VolumeA") = 0
	*    3 = The system cannot find the path specified
	*    5 = Access is denied
	*   21 = The device is not ready
	*  123 = ERROR_INVALID_NAME
	* 1235 = The request was aborted
	? "Error code:", GetLastError()
ENDIF  

Listed functions:

GetLastError
SetVolumeLabel

Comment:

In some cases you have unspecified error 0, e.g. if the floppy is write-protected.