Problem in getting system domain or connected workgroup name.

  • I want to get my system domian name or my local network connected domain name or work group name.
    I used the following code to get the same .. but its always returning empty string ""

    Please let me know whether i am doing anything wrong on this.


  • [quote]QString QHostInfo::localDomainName () [static]

    Returns the DNS domain of this machine.
    Note: DNS domains are not related to domain names found in Windows networks.[/quote]

    As far as I know you will have to resort to platform-specific code, like "NetWkstaGetInfo":

  • Thanks Lukas..for your valuable inputs.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.