Generally if you do an Environment variable check for "OS" you are told on
an Xp machine that you are on NT 5  I think.

Today I saw that one of TurboPowers Apro components produced a log which
included the information:

Operating System : Windows XP 5.1 Service Pack 1

Does any one have any idea where Delphi can retrieve that from?

I use the following  to get the environment varible, but in this case am I
to query the registry?

Or what should "envvar" (below) be set to?


Function TForm1.getenv( const envvar: String ): String;
           var
             bytesNeeded: DWORD;
           begin
             bytesNeeded := GetEnvironmentvariable(PChar(envvar), Nil, 0 );
             If bytesNeeded > 0 Then Begin
               SetLength( Result, bytesNeeded-1 );
               GetEnvironmentVariable( PChar(envvar), Pchar(Result),
bytesNeeded );

             End
             Else
               Result := EmptyStr;
           End;

_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to