Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HDD Serial number
Message
From
11/08/1998 08:38:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
11/08/1998 07:36:03
Jovo Mirkovic
Institute For Students' Health of Bg Uni
Belgrade, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00125520
Message ID:
00125530
Views:
16
>How i can get HDD serial number from VFP 5.0?
To support George's code, you could use this to convert to hex representation :
function dec2hexb
lparameters nDecimal, nDigits
if parameters() < 2
	nDigits = 1
endif	
if nDecimal > 0xffffffff		&& Greater than 32 bit value
	highdword = int(nDecimal / 0x0ffffffff)
	lowdword = 	bitand(nDecimal,0x0ffffffff)
	return dec2hexb(highdword,8)+dec2hexb(lowdword,8)
endif	
cHexString = ""
do while nDecimal > 0
	cHexString = ;
		dec2HexDigit(bitand(nDecimal,0x0F)) ;
		+ cHexString							&& Constitute righmost digit
	nDecimal = bitrshift(nDecimal,4)			&& Drop rightmost digit
enddo
return padl(cHexString,max(nDigits,len(cHexString)),"0")

function Dec2HexDigit
lparameters nDigit
return iif(nDigit > 9, ;
	chr(asc("A")+nDigit-10),;
	chr(asc("0")+nDigit))
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform