473,414 Members | 1,723 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,414 software developers and data experts.

Corrupt strings from GetPortnames()

Ole
I'm facing a problem like a lot of others during the last few years and
Microsoft doesn't seem to care about it :-(
The problem (one of them) is with the Microsoft bluetooth stack that saves
the virtual com ports without the 0 terminating char in the registry. That
causes the SerialPort.GetPortNames() to return garbage strings for the
bluetooth ports.

Well, Googling around the Net didn't help much - I'm simply not able to
find a workaround solution, so I'll pop the question here: Anyone found a
solution?

Thanks for all your help,
Ole
Nov 27 '07 #1
1 4023

"Ole" <ol*@blabla.comwrote in message
news:%2*****************@TK2MSFTNGP06.phx.gbl...
I'm facing a problem like a lot of others during the last few years and
Microsoft doesn't seem to care about it :-(
The problem (one of them) is with the Microsoft bluetooth stack that saves
the virtual com ports without the 0 terminating char in the registry. That
causes the SerialPort.GetPortNames() to return garbage strings for the
bluetooth ports.

Well, Googling around the Net didn't help much - I'm simply not able to
find a workaround solution, so I'll pop the question here: Anyone found a
solution?
My method works with all virtual com ports, although it'd be a bit of work
for you.

Basically, use SetupDi* to enumerate ports from device manager (and
RegisterDeviceNotification if you want to detect hotplug events, like
inserting of a USB bluetooth dongle) and CreateFile to open the device
instance path. If the .NET SerialPort class didn't require all ports to
start with "COM" then you could use it after enumerating yourself, but as it
stands you need a whole new I/O layer.

I highly recommend C++/CLI for the I/O layer, creating an interface usable
from C#.
>
Thanks for all your help,
Ole

Nov 29 '07 #2

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

Similar topics

5
by: Vinay | last post by:
Hi I have a corrupt word file. I am able to open it with the code given below tr Dim pInfo As System.Diagnostics.ProcessStartInfo = New System.Diagnostics.ProcessStartInfo( pInfo.UseShellExecute...
9
by: Bungle | last post by:
Hi There, Does anybody know where i might be able to locate a tool/application that can determine whether a Database is corrupt?? Also, can a bad network connection cause a corruption to a...
4
by: dixie | last post by:
I have come across some code to walk through the records of a corrupt table and copy it record by record to a new table. It comes from the MVPS.Org site and is as follows. -----------------------...
2
by: Marc Bartsch | last post by:
Hi, I use a delegate to call a method from my main GUI thread. This delegate takes one of my business objects as a parameter. When I do a synchronous call, it all works fine, but if I do an...
3
by: SamB | last post by:
Hello all! MY CASE: I'm using VB.net 2005 express on a Dell Laptop with an USB Bluetooth key. I'm trying to send data to a pocketPC. COM numbers changes each time i've got a new bluetooh...
0
by: Fredo | last post by:
I have an app that I'm writing to manage jpgs. Sometimes the photos are corrupt. If I use something like ACDSee, it will show the image, but it will have a note in the status bar that the image is...
7
by: eventuranza | last post by:
For my application, there users can upload and download files to the a webserver. Straightforward enough. However, when they upload a PDF file then try to download it, the file seems to be...
3
by: rdemyan via AccessMonster.com | last post by:
One of my users had a corrupt front end that wouldn't open. My app is launched using a launching application (logon app). The logon app has a button for downloading a "fresh" copy of the front...
8
by: iheartvba | last post by:
Hi this is a query made using access query builder: SELECT tblBank.BankID, Now() AS TimeRecd, Val(Right(nz(,0),3)) AS ConsID, "AutoCASH" AS RecUser, tblBank.Dt, Forms!frmRecCASHRunningBal!tbGroup...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
Oralloy
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,...
0
jinu1996
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...
0
tracyyun
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...
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.