Hi Mr.Antonio
I need few clarifications in respect of nSerialHd()
This is the code I used for testing nSerialHd().
#include "fivewin.ch"
FUNCTION Main()
LOCAL cSerialNos := "", cDrive, n, nSerial, aDrives
cSerialNos += "Default Drive Serial No."+STR(nSerialHD())+CRLF+CRLF
aDrives := aDrives()
FOR n = 1 TO LEN(aDrives)
cDrive := aDrives[n]
nSerial := LTRIM(STR(nSerialHD( cDrive )))
IF cDrive == "A:"
IF IsDiskette()
cSerialNos += "Drive "+cDrive+" Serial No."+LTRIM(STR(nSerialA()) )+CRLF
ELSE
cSerialNos += "Drive "+cDrive+" Serial No."+LTRIM(STR(nSerialA()) )+" ( No Floppy Present in Drive )"+CRLF
ENDIF
ELSE
IF !IsCdRom(cDrive)
cSerialNos += "Drive "+cDrive+" Serial No."+nSerial + CRLF
ELSE
cSerialNos += "Drive "+cDrive+" is a CD Rom Drive"+CRLF
ENDIF
ENDIF
NEXT
MsgInfo(cSerialNos)
RETURN nil
And following is the output generated by above program.
The return value of nSerialHd() is exactly what?
a) Wether is the actual serial number printed on the Hard Disk Drive,
b) Or it is a number generated by the OS ?
c) Will it change when the Hard Disk Drive is formatted ?
d) What are these numbers when called nSerialHd() without any parameter and
when called with nSerialHd("C:"), nSerialHd("D:") and so on...
I have checked another library called "smart.lib" ( the link is provided in this topic itself )
I am getting the following output.
When I compared Serial No., Model No. and Firmware shown in the above output, they are exactly the same printed on
the Hard Disk Drive.
Kindly clarify the points from a to d.
Regards to you
- Ramesh Babu P
- Code: Select all Expand view RUN
- Code: Select all Expand view RUN