Answered by:
Get Machine VLAN if Avalible

Question
-
Hello All,
I have searched high and low for the answer to my query, however, with little success I turn to the community. This is my first time posting here so if I am in the wrong area for my question please advise.
I am currently working on a project to help my fellow commrads on my IT desk. With this application I am seeking help on how to first check if the networkcard support vlan ID tagging, if it is enabled and if an ID has been set.
Please let me know if further information is required.
- Moved by Jack J JunMicrosoft contingent staff Tuesday, March 31, 2020 5:39 AM
Monday, March 30, 2020 7:00 PM
Answers
-
Well,
I think you want to know how to get the id in Visual C#. You should have mentioned that in your question in order not to . So the Visual C# forum was correct: https://social.msdn.microsoft.com/Forums/en-US/home?forum=csharplanguage
Use the function GetAdaptersAddresses: https://docs.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getadaptersaddresses
Here is an example in C#: https://www.codeproject.com/Articles/20225/IP-Configuration-Information-using-IP-Helper-APIs
- Edited by Guido Franzke Tuesday, March 31, 2020 6:08 AM
- Proposed as answer by Richard MuellerMVP, Banned Tuesday, March 31, 2020 8:59 AM
- Marked as answer by Dave PatrickMVP Tuesday, April 7, 2020 12:58 AM
Tuesday, March 31, 2020 6:07 AM
All replies
-
Hi KrogersCsharp,
Thank you for posting here.
Because this thread seems to be related to the network card and VlAN, and the VLAN is related to the switch,in order to give you more professional support, we will move it to where is the forum for ...? Forum to redirect it to the correct forum.
The Visual C# forum discusses and asks questions about the C# programming language, IDE, libraries, samples, and tools.
Best Regards,
Timon
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
- Edited by Timon YangMicrosoft contingent staff Tuesday, March 31, 2020 5:38 AM
Tuesday, March 31, 2020 5:37 AM -
Well,
I think you want to know how to get the id in Visual C#. You should have mentioned that in your question in order not to . So the Visual C# forum was correct: https://social.msdn.microsoft.com/Forums/en-US/home?forum=csharplanguage
Use the function GetAdaptersAddresses: https://docs.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getadaptersaddresses
Here is an example in C#: https://www.codeproject.com/Articles/20225/IP-Configuration-Information-using-IP-Helper-APIs
- Edited by Guido Franzke Tuesday, March 31, 2020 6:08 AM
- Proposed as answer by Richard MuellerMVP, Banned Tuesday, March 31, 2020 8:59 AM
- Marked as answer by Dave PatrickMVP Tuesday, April 7, 2020 12:58 AM
Tuesday, March 31, 2020 6:07 AM