getCurrentDomainName()

The function returns the current domain of the user.

Synopsis

int getCurrentDomainName( string &domain);

Parameters

Parameter Description
&domain The current domain.

Return value

The function returns -1 in case of errors and otherwise 0.

Error

Missing or wrong parameters.

Description

The function returns the current domain of the user. This means the domain the user belongs to.

A computer can also be part of a domain. If a local user is logged in, the function returns the computer name instead of the domain. To query the domain name of the computer, use the function getOSDomainName().

The function returns the current domain of the user.

main()
{
  string domain;
  int i = getCurrentDomainName(domain);
  DebugN(i, domain);
}                           

Assignment

User administration, Waiting Control function

Availability

CTRL