home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 February / Chip_2004-02_cd1.bin / zkuste / konfig / download / msic / Help / Int / MiTeC_WkstaNT.int < prev    next >
Text File  |  2003-08-26  |  2KB  |  77 lines

  1. {*******************************************************}
  2. {                                                       }
  3. {       MiTeC System Information Component              }
  4. {           Windows NT Workstation Info                 }
  5. {           version 8.3 for Delphi 5,6,7                }
  6. {                                                       }
  7. {       Copyright ⌐ 1997,2003 Michal Mutl               }
  8. {                                                       }
  9. {*******************************************************}
  10.  
  11. {$INCLUDE MITEC_DEF.INC}
  12.  
  13. unit MiTeC_WkstaNT;
  14.  
  15. interface
  16.  
  17. uses Windows, Classes, SysUtils;
  18.  
  19. type
  20.   PNTWkstaTransRecord = ^TNTWkstaTransRecord;
  21.   TNTWkstaTransRecord = record
  22.     Name: string;
  23.     Address: string;
  24.     Quality: DWORD;
  25.     VCSCount: DWORD;
  26.     IsWAN: Boolean;
  27.   end;
  28.  
  29.   PNTWkstaUserRecord = ^TNTWkstaUserRecord;
  30.   TNTWkstaUserRecord = record
  31.     Name: string;
  32.     Domain: string;
  33.     Domains: string;
  34.     Server: string;
  35.   end;
  36.  
  37.   TNTWksta = class(TPersistent)
  38.   private
  39.     FTrans, FUsers: TStringList;
  40.     FMachine: string;
  41.     FMajor: DWORD;
  42.     FMinor: DWORD;
  43.     FPlatformId: DWORD;
  44.     FDomain: string;
  45.     FName: string;
  46.     procedure RetrieveTrans(AMachine: string);
  47.     procedure RetrieveUsers(AMachine: string);
  48.     procedure RetrieveInfo(AMachine: string);
  49.     function GetTrans(Index: DWORD): PNTWkstaTransRecord;
  50.     function GetTransCount: DWORD;
  51.     procedure FreeTransList(var AList: TStringList);
  52.     procedure FreeUserList(var AList: TStringList);
  53.     function GetUser(Index: DWORD): PNTWkstaUserRecord;
  54.     function GetUserCount: DWORD;
  55.   public
  56.     constructor Create;
  57.     destructor Destroy; override;
  58.  
  59.     procedure RefreshTrans;
  60.     procedure RefreshUsers;
  61.     procedure RefreshInfo;
  62.  
  63.     property Machine: string read FMachine write FMachine;
  64.     property TransportCount: DWORD read GetTransCount;
  65.     property Transports[Index: DWORD]: PNTWkstaTransRecord read GetTrans;
  66.     property UserCount: DWORD read GetUserCount;
  67.     property Users[Index: DWORD]: PNTWkstaUserRecord read GetUser;
  68.     property MajorVersion: DWORD read FMajor;
  69.     property MinorVersion: DWORD read FMinor;
  70.     property PlatformId: DWORD read FPlatformId;
  71.     property ComputerName: string read FName;
  72.     property DomainName: string read FDomain;
  73.   end;
  74.  
  75. implementation
  76.  
  77.