UltraProtect ---- MachineID

MachineID
ACProtect allow user to generate hardware dependent key.dat.
User defined sample GetMachineID function:
Example for Delphi
function GetMachineID:longint;stdcall;
var i:dword;
buf:array[0..1023]of byte;
begin
//sample code
GetVolumeInformation(' c:', nil, 0,PDWord(@Buf[1]), I, I, nil, 0);
result:=longint((@buf[1])^)
//sample code
end;
exports GetMachineID;
Example for C/C++
If you use VC,the sample user defined function definition is:
//---------------------------------------------------------------------
// This procedure will be called by acprotect for
// setting of hardware key
//---------------------------------------------------------------------
DWORD __declspec(dllexport)GetMachineID()
{
DWORD VolumeSerialNumber;
GetVolumeInformation("c:\",NULL,12,&VolumeSerialNumber,NULL,NULL,NULL,10);
return VolumeSerialNumber;
}
it is a getmachineid sample code ,it only get the volume id of the harddisk 'c:',you must write your own.
|