|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| No
| Win32s
| No
| Import Library
| netapi32.lib
| Header File
| lmaccess.h
| Unicode
| WinNT
| Platform Notes
| All LanMan APIs are UNICODE only
|
|
|
NetGetDCName
The NetGetDCName function returns the name of the Primary Domain Controller (PDC) for the
specified domain.
Security Requirements
No special group membership is required to successfully execute NetGetDCName.
NET_API_STATUS NetGetDCName(
LPWSTR servername,
|
| LPWSTR domainname,
|
| LPBYTE *bufptr
|
| );
|
|
Parameters
servername
Pointer to a Unicode string containing the name of the remote server on which
the function is to execute. A NULL pointer or string specifies the local
computer.
domainname
Pointer to a Unicode string containing the name of the domain. A NULL pointer or string indicates that the function returns the name of the
domain controller for the primary domain.
bufptr
Returns a pointer to an allocated buffer containing the server name of the PDC
of the domain. The server name is prefixed by \\. The buffer should be
deallocated using NetApiBufferFree.
Return Values
If the function succeeds, the return value is NERR_Success.
If the function fails, the return value is one of the following error codes.
Value
| Meaning
| NERR_DCNotFound
| Could not find the domain controller for the domain.
| ERROR_INVALID_NAME
| The name could not be found.
|
See Also
NetGetAnyDCName
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|