One question about GetComputerName()
Hi,
one question about this function: when I have NT domain and use logon scripts, from witch I call my program, in which I call GetComputerName(), what name will be returned? The one of server on which the logon script and exe file reside, or the one of client computer, on which a user is just logging?
I have no possibility to check it right now, but I would like to know it.
Thank you.
Re: One question about GetComputerName()
GetComputerName API will return the NetBIOS name of the computer on which this API is executed.
So, if your program is run on the client computer (via logon script), the API will return the name of the Client.
Re: One question about GetComputerName()
Does this quote from MSDN makes it clearer?
Quote:
The GetComputerName function retrieves the NetBIOS name of the local computer. This name is established at system startup, when the system reads it from the registry.
If the local computer is a node in a cluster, GetComputerName returns the name of the cluster virtual server.
Re: One question about GetComputerName()
Thank you very much Siddhartha!
Re: One question about GetComputerName()