FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour nserialhd() vs serialnumber
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
nserialhd() vs serialnumber
Posted: Thu Mar 11, 2021 03:52 PM
Hello,

What is the different between the serialnumber returned by nSerialHD() and the number returned by the dos-command
wmic diskdrive get serialnumber


I'm always use nSerialHD(), but I see that the other number is also with characters, instead only numbers.
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: nserialhd() vs serialnumber
Posted: Thu Mar 11, 2021 04:10 PM
Try

Code (fw): Select all Collapse
? NUMTOHEX( NSERIALHD() )


EMG
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: nserialhd() vs serialnumber
Posted: Thu Mar 11, 2021 05:48 PM
Unfortunately give this also a number.

Enrico Maria Giordano wrote:Try

Code (fw): Select all Collapse
? NUMTOHEX( NSERIALHD() )


EMG
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: nserialhd() vs serialnumber
Posted: Thu Mar 11, 2021 06:20 PM

Can I see a sample of such serial?

EMG

Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: nserialhd() vs serialnumber
Posted: Thu Mar 11, 2021 09:40 PM
Code (fw): Select all Collapse
nSerialHD() = 410452486
NUMTOHEX( NSERIALHD() ) = 18770206
wmic diskdrive get serialnumber = S3TRNA0M316529
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: nserialhd() vs serialnumber
Posted: Thu Mar 11, 2021 09:43 PM

You forgot the code. :-)

EMG

Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: nserialhd() vs serialnumber
Posted: Thu Mar 11, 2021 09:44 PM
It's added now :-)
Enrico Maria Giordano wrote:You forgot the code. :-)

EMG
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: nserialhd() vs serialnumber
Posted: Thu Mar 11, 2021 09:57 PM

nSerialHD() returns the number of the VOL command.

EMG

Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: nserialhd() vs serialnumber
Posted: Thu Mar 11, 2021 10:12 PM

Yes now I see. :D

It's NUMTOHEX( NSERIALHD() ) that give the same result as the VOL command.

So NSERIALHD() is not the real serial-number. After re-formating it, it will be different then.

There are also utilities to change it :cry:

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite

Continue the discussion