Location: Symbol Reference > Classes > TJwServerInfo Class > TJwServerInfo.Create Constructor
JWSCL Documentation
ContentsIndexHome
PreviousUpNext
TJwServerInfo.Create Constructor
Pascal
constructor Create(const Server: TJwString);
Parameters 
Description 
const Server: TJwString 
the servername for which you would like to retreive information. If Servername is empty string the local machine will be queried. 

The Create constructor creates the TJwServerInfo object and reserves memory for it.

var
  ServerInfo: TJwServerInfo;

begin
  // Create TJwServerInfo object and reserve memory for it
  ServerInfo := TJwServerInfo.Create('REMOTESERVER');

  // Are we running on a Server?
  if ServerInfo.IsServer then
  begin
    Memo1.Lines.Add(Format('Server %s runs a Server OS', [ServerInfo.Server]));
  end;

  // Vista or higher code
  if ServerInfo.IsWindowsVista(True) then
  begin
    // Do some Vista specific stuff
  end;

  // Free Memory!
  ServerInfo.Free;
end;
Copyright (c) 2010. All rights reserved.
This help was created by Doc-O-Matic sponsored by toolsfactory software inc.
What do you think about this topic? Send feedback!