
Getting the workgroup name
NetWkstaGetInfo is indeed only available from NT in 32-bit. However,
you can use the same function which is exported from the 16-bit API. I
had to do something similar a few years ago, and I wrote a pair of DLLs
to thunk the data from 16-bit to 32-bit.
Take a look at the 16-bit API version of the call. I think it's level
10 you want. The call will return the name of the computer, username,
workgroup and domain name.
Eventually I was planning to post how I did it to my VB web site
(www.sourcevault.com).
-Paul Haines
Quote:
> From my VB app I need to get the name of the computer's network
> workgroup or domain (the name that appears below the computer name in
> the "Identification" tab of the Control Panel's "Network" applet.
> I've been searching {*filter*} this, but I didn't find the way to get
> that name.
> I found the NetWkstaGetInfo API function, but it only works on Windows
> NT, and I need to get the name from Windows 95 and 98 also.
> Does anyone know how to do this?
> Thanks in advance,
> Leonardo Bosi
Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.