CFileSys.GetSerialNumbermethod
Returns the decimal serial number used to uniquely identify a disk volume.
Syntax
FUNCTION GetSerialNumber (BYREF wszDrive AS WSTRING) AS LONG
Parameters
| Name | Description | |
|---|---|---|
wszDrive | CBSTR. The drive letter. For drive letters, the root drive is not included. For example, the path for the C drive is C:, not C:\\. |
Return value
LONG. The serial number.
Description
Returns the decimal serial number used to uniquely identify a disk volume.
Remarks
You can use the GetSerialNumber method to ensure that the correct disk is inserted in a drive with removable media.
Example
#INCLUDE ONCE "AfxNova/CFileSys.inc" DIM pFileSys AS CFileSys DIM nSerialNumber AS LONG = pFileSys.GetSerialNumber("C:")
Reference
- Include file
CFileSys.inc - Defined in AfxNova/CFileSys.inc:1144
- Documented in File Management/CFileSys Class.md
- Topic: CFileSys Class