
Getting Domain Controller Name
Quote:
> Thanks, but makes little sense without sample syntax of call. ServerName,
> is that the PDC or BDC? How can alphanumerics have a BYTE Data Type? Am I
> Supplying the Servername to get the domain name?
1. The server name is a byte array because the API is Unicode, therefore will run only
on NT and *not* 95.
Here's an VB example:
Dim Name as String
Dim NArray() As Byte
Name = "John"
NArray = Name & vbNullChar
2. The server name that this API is asking for is the NT domain member server/wrkstn machine name the
function will be executing on, it does not have to be a domain controller.
You can get this by using the GetComputerName ANSI API call.
I suggest that if you don't know a hell of a lot about the Lanman API, Unicode and Win32 architecture that
you don't even attempt using it for production applications.
I good VC reference for this is Win32 Network Programming, Addison Wesley Developers Press.
Otherwise the Win32 SDK is another good source.
I don't know any VB books on this - the reason
being that the B in VB stands for BEGINNERS.