I found this at vb-world in the Win32 API section of tips. I know its Visual Basic, but since its an API Call you should be able to easily port it over to VC++ (since you dont even have to make an API declaration like in VB)<br><br>here it is:<br><br><FONT FACE=monospace><br><b>How can I retrieve a disk's serial number?</b><br><br>Whenever a disk is formatted, the operating system writes a serial number onto it. This number is not guaranteed to be unique, but as it is a 32 bit integer it is unlikely to find a duplicate! The number is often used as part of a copy protection system. This tip shows you how to retrieve the number.<br><br><i><b>Declarations</b></i><br><br>Copy this code into the declarations section of the project.<br><br>Private Declare Function GetVolumeInformation Lib _<br>"kernel32.dll" Alias "GetVolumeInformationA" (ByVal _<br>lpRootPathName As String, ByVal lpVolumeNameBuffer As _<br>String, ByVal nVolumeNameSize As Integer, _<br>lpVolumeSerialNumber As Long, lpMaximumComponentLength _<br>As Long, lpFileSystemFlags As Long, ByVal _<br>lpFileSystemNameBuffer As String, ByVal _<br>nFileSystemNameSize As Long) As Long<br><br><i><b>Code</b></i><br><br>Function GetSerialNumber(strDrive As String) As Long<br> Dim SerialNum As Long<br> Dim Res As Long<br> Dim Temp1 As String<br> Dim Temp2 As String<br> Temp1 = String$(255, Chr$(0))<br> Temp2 = String$(255, Chr$(0))<br> Res = GetVolumeInformation(strDrive, Temp1, _<br> Len(Temp1), SerialNum, 0, 0, Temp2, Len(Temp2))<br> GetSerialNumber = SerialNum<br>End Function<br>Use<br><br><i><b>An example of using the above function:</b></i><br><br>Call MsgBox GetSerialNumber("C:"

<br>This will bring up a message box with the serial number of the C drive.<br><br></font><br> <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href=
</a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)