NetWkStaGetInfo和WNet*依赖于workstation服务,但是即使没启动此服务,也可以在我的电脑里改WORKGROUP.
在注册表里搜索改后名称,也只搜到了一个地方PolPrDmN,应该不是这里.

解决方案 »

  1.   

    function   GetNetWorkgroup   :   string;   
      var   
          Reg   :   TRegistry;   
      begin   
          Reg   :=   TRegistry.create;   
          Result   :=   '(n/a)';   
          with   Reg   do   
          try   
                RootKey   :=   HKEY_LOCAL_MACHINE;   
                if   OpenKey('System\CurrentControlSet\Services\VxD\VNETSUP',     
                      false)   then   
                      Result   :=   ReadString('Workgroup');   
          finally   
                CloseKey;   
                free;   
          end;   
      end;
      

  2.   

    http://download.csdn.net/source/1462183
      

  3.   

    只98的不行,
    那个代码也是用ActiveDS Typelib管理Window用户的