primary domain:
LookupAccountName
NetGetDCName
Enumerating network resources
Enumerating servers of the specified type (e.g. SQL Server) in the primary domain
How to enumerate, add and delete shares on the local computer (WinNT/XP)
Retrieving the name of the primary domain controller (PDC) and join status information (NT/2000/XP)
Using mailslots to send messages on the network