Re: GetComputerName() question

2002-11-05 Thread Martin Wilck
Oops - just stumbled into this one: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/computer_names.asp On Win2k and later DNS name and Netbios name are linked by convention. That is, having them separate is discouraged, but not impossible. I wonder what we should

Re: GetComputerName() question

2002-11-04 Thread Martin Wilck
This works for GetComputerName(), but not for apps that look directly in the registry. This is why we need to put something in there. Yes, but only if there is nothing in there yet. I am not against setting this registry value and I see why it's set. I was just saying that this init stuff

Re: GetComputerName() question

2002-11-04 Thread Alexandre Julliard
Martin Wilck [EMAIL PROTECTED] writes: - check the availability of the ComputerName entry in the registry, - if not there, set it directly from gethostname() Then I'd implement proper ComputerNameEx(), ComputerName() in Kernel32 with all options, and remove it from the init code. That

Re: GetComputerName() question

2002-10-31 Thread Martin Wilck
Am Mit, 2002-10-30 um 20.25 schrieb Alexandre Julliard: Because users are not going to edit the registry if their Unix hostname changes so it will always be wrong. Now if the problem is the FQDN then it should be trivial to truncate it to just the hostname. Sorry, how many machines are out

Re: GetComputerName() question

2002-10-31 Thread Martin Wilck
Am Mit, 2002-10-30 um 20.25 schrieb Alexandre Julliard: Because users are not going to edit the registry if their Unix hostname changes so it will always be wrong. Now if the problem is the FQDN then it should be trivial to truncate it to just the hostname. You did not explain why this must

Re: GetComputerName() question

2002-10-31 Thread Martin Wilck
Am Mit, 2002-10-30 um 20.25 schrieb Alexandre Julliard: Because users are not going to edit the registry if their Unix hostname changes so it will always be wrong. Now if the problem is the FQDN then it should be trivial to truncate it to just the hostname. I can't help myself - I think the

Re: GetComputerName() question

2002-10-31 Thread Alexandre Julliard
Martin Wilck [EMAIL PROTECTED] writes: I'd propose: If the registry contains an explicit ComputerName entry, use it as Netbios name; otherwise, use the Unix hostname. This would affect only the users that enter a Netbios name in their registry, and thus not those with changing host names that

GetComputerName() question

2002-10-30 Thread Martin Wilck
Why is GetComputerName() an init function, or in other words, why is it important that HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\ComputerName\\ComputerName be set at registry initialization time (in _allocate_default_keys())? I am asking because GetComputerName() IMO returns the

Re: GetComputerName() question

2002-10-30 Thread Alexandre Julliard
Martin Wilck [EMAIL PROTECTED] writes: I am asking because GetComputerName() IMO returns the wrong value (FQDN rather than NETBIOS name). A real implementation of GetComputerName() would look for the above value in the Registry and use gethostname() only as a fallback, but currently it's the