GetComputerName() question

Martin Wilck Martin.Wilck at
Mon Nov 4 02:43:30 CST 2002

> 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 Wilck                Phone: +49 5251 8 15113
Fujitsu Siemens Computers   Fax:   +49 5251 8 20409
Heinz-Nixdorf-Ring 1	    mailto:Martin.Wilck at
D-33106 Paderborn 

More information about the wine-devel mailing list