Getting the workgroup name 
Author Message
 Getting the workgroup name

Hello,

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
--------------------------------------
Proximity Soft ( http://www.*-*-*.com/ )
Buenos Aires, Argentina
--------------------------------------



ICQ: 9027216
--------------------------------------
Life's for my own, to live my own way...



Fri, 30 Nov 2001 03:00:00 GMT  
 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.


Sat, 01 Dec 2001 03:00:00 GMT  
 Getting the workgroup name
Being somewhat of a newbie, I don't have the details on the 16-bit API
you reference here... Can you give us some sample code (or point us in
the right direction...)

Personally, I am trying to retrieve the NT group info within an Access
application so that I don't have to replicate NT security into Access'
security model.

Thanks!

Quote:

> 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

> > 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.

--
Edward V. Weber
Weber Enterprises, Inc.



Sat, 22 Dec 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Getting names of workgroups

2. Getting current workgroup or domain name

3. Getting a list of Computer's on a network and or a list of Workgroups

4. Getting the Workgroup for a PC

5. Getting collections of domains/workgroups etc.

6. Getting workgroup info.

7. get pc names for current workgroup

8. How to Get the WorkGroup Name?

9. How to get all workgroup names in windowsxp?

10. Domain-name and/or Workgroup info

11. How to detect Computer Name and Workgroup ?

12. Workgroup name

 

 
Powered by phpBB® Forum Software