How to Read the Drive’s Serial Number

Posted December 15th @ 1:09 pm by m3Rlin

The drive’s serial number can be useful for for a lot of things (check out previous tip). This example code shows you how to read the hard drives serial number.

function GetHddSerial: Integer;
var
aBuffer: array [0..255] of Char;
dwTemp: DWord;
pdwSerial: PDWord;
begin
if GetVolumeInformation(’c:’, aBuffer, SizeOf(aBuffer), @pdwSerial, dwTemp, dwTemp, nil, 0) then
[...]

How to Read the Mainboard’s BIOS Information

Posted December 15th @ 1:08 pm by m3Rlin

Mainboard BIOS information can be very useful. Let’s say, for instance, that you want to make sure nobody makes illegal copies of your program. The most popular way is to use a serial number. But serial numbers can be copied or even published on the Internet. The only way to get over this is to [...]