473,395 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to get my Network Workgroup Name with C#

Hi there,
How to get my Network Workgroup Name with C#???

Hope you can help

Best Regards

Nov 17 '05 #1
4 7089
Hi,

Use P/Invoke to call the NetGetJoinInformation Windows API function.

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> wrote in message
news:9F**********************************@microsof t.com...
Hi there,
How to get my Network Workgroup Name with C#???

Hope you can help

Best Regards


Nov 17 '05 #2
hum...never done that before...

May you write an xample?

"Dmytro Lapshyn [MVP]" wrote:
Hi,

Use P/Invoke to call the NetGetJoinInformation Windows API function.

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> wrote in message
news:9F**********************************@microsof t.com...
Hi there,
How to get my Network Workgroup Name with C#???

Hope you can help

Best Regards


Nov 17 '05 #3
http://pinvoke.net/default.aspx/neta...formation.html

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> wrote in message
news:DC**********************************@microsof t.com...
hum...never done that before...

May you write an xample?

"Dmytro Lapshyn [MVP]" wrote:
Hi,

Use P/Invoke to call the NetGetJoinInformation Windows API function.

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> wrote in message
news:9F**********************************@microsof t.com...
> Hi there,
> How to get my Network Workgroup Name with C#???
>
> Hope you can help
>
> Best Regards
>
>
>



Nov 17 '05 #4

"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> wrote in message
news:9F**********************************@microsof t.com...
Hi there,
How to get my Network Workgroup Name with C#???

Hope you can help

Best Regards


When you need this in a desktop application you can get the Workgroup name
from the Environment.UserDomainName property.

Willy.

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jane Davis | last post by:
Hello I have a web server running ASP.Net and would like to be able to upload documents from a website on this server to a share on a seperate server (not in same domain or workgroup). Is this...
3
by: Hei | last post by:
Hi, is .net framework provide a class that can browse network machine and reutrn a machine name that is user selected ? i find such function in .net framework reference for a long time. thx....
3
by: Steve | last post by:
Hi all How would i get a list of all Active Computers on a network? All I need are the computer names. Kind Regards, Steve.
0
by: Steve D | last post by:
Hi. I am using the following code to try and populate two list boxes. The first, lstWorkgroups, is to show a list of the workgroups on my network. The second, lstComputers, is to show a list of the...
1
by: Roger | last post by:
I would like to get a list of machines on my network (Workstations and/or Servers). Is there a way to do this in VB.Net? Thanks, Rog
4
by: CanuckChuck | last post by:
Hello there, I have recently followed the steps to creating my secure database as outlined by the following link: http://www.databasedev.co.uk/access_security.html I have copied the Workgroup...
5
by: buddyr | last post by:
Hello, I am trying to set up network at home between my vista computer and xp computer. I have a dsl connection- comes into modem and then to my netgear router/switch. I have wireless nic cards in...
4
by: Prof. William Battersea | last post by:
Hello, Suppose I have a Vista machine called VISTA and an XP machine called XP in a workgroup named WORKGROUP. Physically they're connected to a router and I can see lists of public and shared...
2
by: Pinette | last post by:
I have four computers on a workgroup, all wired directly into a wireless router. I need to add a fifth but there are no more cat5 ports on the router. So, the fifth connects via wireless and the four...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.