Get PDC Name
The NetGetDCName function returns the name of the Primary Domain Controller (PDC) or PDC Emulator for the specified domain. Module Option Explicit’API callsPrivate Declare Function NetGetDCName Lib “netapi32.dll” (ServerName As Any, DomainName As Any, lpBuffer As Long) As LongPrivate Declare Function NetApiBufferFree Lib “netapi32.dll” (ByVal pBuffer As Long) As Long Private Declare Sub CopyMem Lib “kernel32.dll” Alias “RtlMoveMemory”… Read More »