خدم الحسين
10-08-2010, 12:38 AM
أين الخطأ في هذا الكود
function getinstalldate: String;
var
di: Longint;
buf: Array [ 0..3 ] of byte;
begin
result := 'unknown';
with tregistry.create do
begin
rootkey := hkey_local_machine;
lazywrite := true;
openkey ( '\software\microsoft\windows nt\currentversion', false );
di := readbinarydata ( 'installdate', buf, sizeof ( buf ) );
// result := datetimetostr ( filedatetodatetime ( buf [ 0 ] + buf [ 1 ] * 256 + buf [ 2 ] * 65535 + buf [ 3 ] * 16777216 ) );
showmessage(inttostr(di));
free;
end;
end;
انه لمعرفه تاريخ تنصيب الوندوز عندما استخدمه يظهر خطأ لماذا؟؟
function getinstalldate: String;
var
di: Longint;
buf: Array [ 0..3 ] of byte;
begin
result := 'unknown';
with tregistry.create do
begin
rootkey := hkey_local_machine;
lazywrite := true;
openkey ( '\software\microsoft\windows nt\currentversion', false );
di := readbinarydata ( 'installdate', buf, sizeof ( buf ) );
// result := datetimetostr ( filedatetodatetime ( buf [ 0 ] + buf [ 1 ] * 256 + buf [ 2 ] * 65535 + buf [ 3 ] * 16777216 ) );
showmessage(inttostr(di));
free;
end;
end;
انه لمعرفه تاريخ تنصيب الوندوز عندما استخدمه يظهر خطأ لماذا؟؟