1.nt 还是 windows 98?取得当前操作平台
function getosinfo : string;
begin
result := "";
case win32platform of
ver_platform_win32_windows: result := "windows 95/98";
ver_platform_win32_nt: result := "windows nt";
else
result := "windows32";
end;
end;
2.获取当前windows用户的登录名
function getcurrentusername : string;
const
cnmaxusernamelen = 254;
var
susername : string;
dwusernamelen : dword;
begin
dwusernamelen := cnmaxusernamelen-1;
setlength( susername, cnmaxusernamelen );
getusername(pchar( susername ), dwusernamelen );
setlength( susername, dwusernamelen );
result := susername;
end;
3. windows控制面板的访问
//在窗体的private节中作executefile函数声明,并在实现部分书写如下代码:
function tform1.executefile(const params: string): thandle;
var
zfilename, zparams, zdir: array[0..79] of char;
begin
result := shellexecute(application.mainform.handle,
nil,strpcopy(zfilename, "c:\windows\rundll32.exe"),
strpcopy(zparams, params),
strpcopy(zdir, "c:\windows\"),
sw_show);
end;
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器