精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>编程开发>>● Delphi>>Windows API函数>>Re:Delphi中判别操作系统的函数是什么?

主题:Re:Delphi中判别操作系统的函数是什么?
发信人: jameszhou()
整理人: teleme(2001-04-07 22:09:23), 站内信件
【 在 enya3 的大作中提到:】
:是98还是2000,nt?
:同时如何得到系统安装目录名称?谢谢!
:......


Const WF_WINNT = $4000;

Var
  Version : packed record
              case Boolean of
              false: (
                     Windows : record
                                 major : byte;
                                 minor : byte;
                               end;
                     DOS     : record
                                 minor : byte;
                                 major : byte;
                               end;
                      );
              true: vlong: LongInt;
            End;
begin
  ...
  version.vlong := GetVersion;
  IsNT := (GetWinFlags and WF_WINNT) <> 0;
  ...
end;


(2) GetWindowsDirectory

James.



[关闭][返回]