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 makes me nervous when thinking about improving the function - obviously the "normal" registry functions aren't yet available. What I'd propose for init time is
- 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.
Do you really need a NetBIOS name different from the hostname?
I do not strictly need it. But without doubt the two name concepts are different. Users/administrators may need it. I like the idea that administrators can have consistent settings between Samba and Wine (btw I thought about parsing smb.conf for these entries to make additional registry editing superfluous, but this is a future issue).
Martin