New topic: Getting Serial Port Names in Vista
<http://forums.realsoftware.com/viewtopic.php?t=24018> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message rbenditt Post subject: Getting Serial Port Names in VistaPosted: Wed Aug 20, 2008 4:06 pm Joined: Fri Sep 30, 2005 11:42 am Posts: 13 Does anyone know how to do this? I'm not talking about "com1:", "com2:", etc. I'm looking for the name that the device has registered with a com port. With Windows XP, I used to do this: Code:Dim regSerialPorts As RegistryItem Dim v As Variant Dim PName As String Dim i As Integer Try regSerialPorts = New RegistryItem("HKEY_LOCAL_Machine\HARDWARE\DEVICEMAP\SERIALCOMM") i=0 While i<50 PName="\Device\VCP"+str(i) v=regSerialPorts.Value(PName) If v=nil Then i=i+1 Else i=50 End If Wend Return v Catch RegistryAccessErrorException Return "No Serial Ports Found" End Try Now that Vista has come along, I get a RegistryAccessErrorException. Apparently Vista doesn't like me mucking about in that part of the registry. Is there any way around this? Thanks, Ron Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 900 classes with 18000 functions in one REALbasic plug-in. The Monkeybread Software Realbasic Plugin v8.1. <http://www.monkeybreadsoftware.de/realbasic/plugins.shtml> [email protected]
