I have a strange with my computers. I chose C# because that is what I mostly do!
-
I have posted my broblem in several place.. No replys that fixed anything. I am not sure how this began BUT I have it on several computers I have. Three running XP home, One XP Media, and One running Linux and XP Pro (which crashed!) so it is sitting in the corner! My only thought is I have a bluetooth dongle from LINK-SYSTEMS (not blaiming them) A DBT-120 that loaded a Toshiba stack. Nothing wrong with it but I wanted to use the the Microsoft stack. Anyway, .. Using // Reference registry hive. Microsoft.Win32.RegistryKey hklm = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey myportsregKey = hklm.CreateSubKey("Hardware\\Devicemap\\Serialcomm\\"); Used to return my bluetooth port COM: ports. The string returns a garbage character at the end of the COM?? string. I'm using something like //Display value names found in registry foreach (String valueName in myportsregKey.GetValueNames()) { String toport; ////////////////////////////// // THIS string is returned OK toport = valueName; toport += " .. "; // just a separator // Display ports data found in resistry // Note that I have seen the extra character as a number. // Example" PORT8 will display as PORT81.. Or some strange character // It really screws you up trying to open port 81 when it's really port 8! // String for my bluetooth ports are returned corrupted toport += myportsregKey.GetValue(valueName); portList.Items.Add(toport); } YES! I KNOW YOU FOLKS CAN DO BETTER! NOT ME! Anyway, if I use regedit I can type anything I want into the REG_SZ and it will return as I typed it. BUT, if I reboot and try this I get the extra character after the COMM port. I assume the registry is written to updating the serial ports. I WOULD SURE LIKE TO SOLVE THIS. Reinstalling everything on my computers IS NOT A OPTION!:mad: