nserialhd() vs serialnumber

nserialhd() vs serialnumber

Postby Marc Vanzegbroeck » Thu Mar 11, 2021 3: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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium


Re: nserialhd() vs serialnumber

Postby Marc Vanzegbroeck » Thu Mar 11, 2021 5:48 pm

Unfortunately give this also a number.

Enrico Maria Giordano wrote:Try

Code: Select all  Expand view
? NUMTOHEX( NSERIALHD() )


EMG
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: nserialhd() vs serialnumber

Postby Enrico Maria Giordano » Thu Mar 11, 2021 6:20 pm

Can I see a sample of such serial?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8711
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: nserialhd() vs serialnumber

Postby Marc Vanzegbroeck » Thu Mar 11, 2021 9:40 pm

Code: Select all  Expand view
nSerialHD() = 410452486
NUMTOHEX( NSERIALHD() ) = 18770206
wmic diskdrive get serialnumber = S3TRNA0M316529
 
Last edited by Marc Vanzegbroeck on Thu Mar 11, 2021 9:43 pm, edited 1 time in total.
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium


Re: nserialhd() vs serialnumber

Postby Marc Vanzegbroeck » Thu Mar 11, 2021 9:44 pm

It's added now :D
Enrico Maria Giordano wrote:You forgot the code. :-)

EMG
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: nserialhd() vs serialnumber

Postby Enrico Maria Giordano » Thu Mar 11, 2021 9:57 pm

nSerialHD() returns the number of the VOL command.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8711
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: nserialhd() vs serialnumber

Postby Marc Vanzegbroeck » 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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 65 guests