🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #12223

Re: FirstTimeWindowsInstalled.

#12223
From: Safari
Date: Tue, 16 Dec 2003 10:43
36 lines
2070 bytes
"Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message
news:3fdcddd4$1@newsgroups.borland.com...
|
| Gambit

Thanks Remy,
My meaning is:

Var Version: TOSVersionInfo; Bufer: Array[0..3] of Byte; Regis: TRegistry;
Begin
   Regis := TRegistry.Create;
   Regis.RootKey := HKEY_LOCAL_MACHINE;
   Version.dwOSVersionInfoSize := SizeOf(Version);
   GetVersionEx(Version);
   Case Version.dwPlatformID of
      VER_PLATFORM_WIN32_WINDOWS:
      Begin
         Regis.OpenKey('\Software\Microsoft\Windows\CurrentVersion', False);
         Regis.ReadBinaryData('FirstInstallDateTime', Bufer, SizeOf(Bufer));
         Label1.Caption := FormatDateTime('yyyy/mm/dd',
         FileDateToDateTime(Bufer[0] + Bufer[1] * 256 +
         Bufer[2] * 65535 + Bufer[3] * 16777216));
      End;
      VER_PLATFORM_WIN32_NT:
      Begin
         Regis.OpenKey('\Software\Microsoft\Windows NT\CurrentVersion',
False);
         Label1.Caption := FormatDateTime('yyyy/mm/dd',
         Regis.ReadInteger('InstallDate'));
         // --------------------------------- Error!
         // Return me: 30314/21/01!
      End;
   End;
   Regis.Free;
End;
Technical Details
Message-ID: <3fdf87d6@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fdc4d66@newsgroups.borland.com> <3fdcddd4$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,4bc4a0b3c60109c0
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-12-16 14:40:07 PST
From: "Safari" <Safari@alloymail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3fdc4d66@newsgroups.borland.com> <3fdcddd4$1@newsgroups.borland.com>
Subject: Re: FirstTimeWindowsInstalled.
Date: Tue, 16 Dec 2003 14:13:41 +0330
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 194.225.63.168
Message-ID: <3fdf87d6@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1071613910 194.225.63.168 (16 Dec 2003 14:31:50 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail