Board index » delphi » Determining the Version of Windows 95 that is running

Determining the Version of Windows 95 that is running

I want to write a little Delphi utility that only determines the
version of Windows 95 (A, B or C) that is currently running on the
clients PC.

Can anyone tell me what I need to do to determine what verion of
Windows 95 is running.

Thanks for any info anyone may have.
Lee

Sent via Deja.com http://www.deja.com/
Before you buy.

 

Re:Determining the Version of Windows 95 that is running


Quote
leevd...@my-deja.com wrote:

> I want to write a little Delphi utility that only determines the
> version of Windows 95 (A, B or C) that is currently running on the
> clients PC.

> Can anyone tell me what I need to do to determine what verion of
> Windows 95 is running.

> Thanks for any info anyone may have.
> Lee

> Sent via Deja.com http://www.deja.com/
> Before you buy.

I suppose GetVersionEx does what you want.

Alex
--
** Pepsi Cola and animal protection **
**  http://www.pepsi{*word*76}bath.com/  **

Author of the free Chatsystem PINO! || Website: http://www.alcomp.net
Available at http://pino.cjb.net    || Chat   : pinochat.dhs.org:8080

Re:Determining the Version of Windows 95 that is running


Quote
leevd...@my-deja.com wrote:
> I want to write a little Delphi utility that only determines the
> version of Windows 95 (A, B or C) that is currently running on the
> clients PC.

> Can anyone tell me what I need to do to determine what verion of
> Windows 95 is running.

# here's something "Zortek" posted somewhere else...
# bye, dennis.

function TMainForm.Version:string; // written by: "Zortek"
<zor...@rentec.net>
const
  InfoNum = 10;
  InfoStr : array [1..InfoNum] of String =
    ('CompanyName', 'FileDescription', 'FileVersion', 'InternalName',
     'LegalCopyright', 'LegalTradeMarks', 'OriginalFilename',
     'ProductName', 'ProductVersion', 'Comments');
var
  S         : String;
  n, Len    : dword;
  Buf       : PChar;
  Value     : PChar;
begin
 S:=Application.ExeName;
 n:=GetFileVersionInfoSize(PChar(S),n);
 if n>0 then begin
  Buf:= AllocMem(n);
  GetFileVersionInfo(PChar(S),0,n,Buf);
  if
VerQueryValue(Buf,PChar('StringFileInfo\041004E4\'+InfoStr[3]),Pointer(Value
),Len) then Result:='v.'+Value else Result:='';
  FreeMem(Buf,n);
 end else
  Result:='';
end;

Other Threads