Overview
Group
Quick Info

Windows NT
Yes
Win95
No
Win32s
No
Import Library
rassapi.lib
Header File
rassapi.h
Unicode
WinNT
Platform Notes
None

RasAdminGetUserAccountServer

[New - Windows NT]

The RasAdminGetUserAccountServer function retrieves the name of the server that has the user account database. You can use the returned server name in the RasAdminUserGetInfo and RasAdminUserSetInfo functions to get or set information about a specified user.

DWORD RasAdminGetUserAccountServer(

const WCHAR *lpszDomain,
// pointer to the name of the Windows NT domain
const WCHAR *lpszServer,
// pointer to the name of the RAS server
LPWSTR lpszUserAccountServer
// receives the name of the user account server
);

Parameters

lpszDomain

Pointer to a null-terminated Unicode string that contains the name of the domain to which the RAS server belongs. This parameter can be NULL if you are running your RAS administration application on a Windows NT Workstation or Server that is not participating in a Windows NT domain. If this parameter is NULL, the lpszServer parameter must be non-NULL.

lpszServer

Pointer to a null-terminated Unicode string that contains the name of the Windows NT RAS server. Specify the name with leading "\\" characters, in the form: \\servername. This parameter can be NULL if the lpszDomain parameter is not NULL.

lpszUserAccountServer

Pointer to a buffer that receives a null-terminated Unicode string containing the name of the primary domain controller (PDC) Windows NT server that has the user account database. The buffer should be big enough to hold the server name (UNCLEN +1). The function prefixes the returned server name with leading "\\" characters, in the form: \\servername. If the server name specified by lpszServer is a stand-alone Windows NT Server or Workstation (that is, the server or workstation does not participate in a Windows NT domain), then the server name itself is returned in the lpszUserAccountServer buffer.

Return Values

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value can be the following error code.

Value
Meaning
ERROR_INVALID_PARAMETER
Both lpszDomain and lpszServer are NULL.

Do not call GetLastError to get error information for this function.

Remarks

The lpszDomain parameter should specify a valid Windows NT domain name. If you are running your RAS administration application on a Windows NT Workstation or Server that is not participating in a Windows NT domain (for example, the workstation or server is in its own work group), then set lpszDomain to NULL. In this case, you must specify your server name in the lpszServer parameter. Be sure to prefix the server name with the "\\" characters. To get the server name, call the GetComputerName function.

See Also

GetComputerName
, RasAdminUserGetInfo, RasAdminUserSetInfo

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database