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 Get the CPU Vendor Name

Posted December 15th @ 1:06 pm by m3Rlin

The CPUID instruction gives you a lot of information about the CPU. You don’t have to write hundreds of lines of code to find out what CPU is installed as you have to to find out if a 286 or a 386 chip is installed. To get the CPU vendor name use this code. This [...]

« Previous Entries