473,395 Members | 1,846 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.

Finding/Listing usb/bluetooth/... serial-ports with System.Management.dll[reposted from microsoft.public.dotnet.framework.sdk, microsoft.public.dotnet.framework.wmi]

Having posted in microsoft.public.dotnet.framework.sdk and
microsoft.public.dotnet.framework.wmi without receiving any response, I
posthere on the off-chance that someone who isn't following those groups
knows a solution.

I'm using code (roughly like):

using System;
using System.Management;
public class Foo {
public static void Main() {
foreach ( ManagementObject port
in new ManagementClass("Win32_SerialPort").GetInstances() )
Console.WriteLine("{0}: {1}", port["deviceid"], port["name"]);

To query for the serial ports present on a system.

Unfortunatly, this doesn't seem to include COM-ports available via
usb-adapters or bluetooth. These devices are visible in the
DeviceManager in System->Hardware->DeviceManager->Ports (COM & LPT), and
I want to get the same list as that, just without the LPT ports.

What am I doing wrong?

I had trouble finding info on the web, so here's something for the
search engines to catch on for the benefit of the next guy.

Keywords: com, com-port, serial-port, WMI, System.Management, .NET, C#,
enumerating, listing, finding, searching, win32, windows, win32api)

Helge Jensen
-=> Sebastian cover-music: http://ungdomshus.nu <=-
Jul 22 '05 #1
0 2249

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

Similar topics

by: Jean-Sébastien Guay | last post by:
Hello, I'm pretty new to Python, though I have a fair bit of experience with C/C++, Java, Perl, PHP and others. I installed Tim Golden's wmi module...
by: Alvin Lau | last post by:
It is possible to write a bluetooth application software by C# in Pocket PC ? If it is possible , where can i find the reference or sample? ThX ~ *** Sent via Developersdex...
by: Srinivas | last post by:
Hi, I am working on a project to script all database objects.The code below works fine on my machine( windows XP ) and all the creates all the db objects. But I get an error message when I run...
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
by: Vaughn | last post by:
I'm looking for a reliable Web Hoster that has full Dot Net functionality.I'm basically looking for something that's about $10/month or less, has ASP.Net support, and has positive feedback and...
by: Yavuz Bogazci | last post by:
Hi, how can i get the serial number and the model number of a monitor via WMI? thanks yavuz bogazci
by: henrycortezwu | last post by:
Hi All, I'd like to transfer files from a Desktop computer to my Cellphone/PDA using VB.NET I've research a bit on this, and I found that I would need to do it using OBEX via Serial Bluetooth...
by: AbdullahWMGhaleb | last post by:
--Dear All, Using WMI, I managed to get information about device ID and manufacturer of my USB Bluetooth adapter. However, I CANNOT GET Blueooth Device Screen Name !...
by: Logan | last post by:
I am interested in programmatically connecting my computer to my cell phone's bluetooth Hands-Free Profile (HFP). So can can use my computer to answer and make calls as well as route the audio...
by: MarkTingson | last post by:
Hello Scripters, I have a project that needs to connect with a bluetooth device. My bluetooth is connected to my USB Port..Is it possible to use MSCOMM control to access my bluetooth?. ...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
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,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.