发信人: teleme@GZ() 
整理人: teleme(2001-02-10 23:06:53), 站内信件
 | 
 
 
 标  题: Re: 怎样取得当前登录的网络用户名及密码? 难道没人知道吗? 发信站: 网易虚拟社区 (Sun Jul 23 08:05:36 2000), 站内信件
  密码我不知道如何获得,但是用户名到是可以从注册表中获得
 但是98的和nt的注册表不一样
 在98中,可以参照下面的函数
 
 function get_current_user:string;
 var Reg:TRegistry;
 begin
 
    Reg:=TRegistry.Create;
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
     if Reg.OpenKey('System\CurrentControlSet\Control',true) then
       get_current_user:=Reg.ReadString('Current User')
 end;
  -- ※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 61.131.66.117]
  | 
 
 
 |