[Mono-dev] SerialPort - GetPortNames patch

Martin Green martin at martsoft.co.uk
Sun Dec 2 17:41:04 EST 2007

Hi Robert,

> it would even work on NT 3.1: http://support.microsoft.com/kb/102988

I thought it would, thanks for confirming.

> Please add a null check for "subkey" after
> RegistryKey subkey =
> Registry.LocalMachine.OpenSubKey("HARDWARE\\DEVICEMAP\\SERIALCOMM");
> and consider the "using" pattern.

Done, attached. 

> Shouldn't be the default port name the first entry of this
> list? Your patch presets "COM1".

Yes i agree and have changed it to match. Anyone else got any thoughts on 
I checked on MSDN and it does say that COM1 should be default but it should 
always be first on the list, if it exists. I left in the previous defaults if 
GetPortNames doesn't return anything as i don't think it is supposed to throw 
an exception at that stage.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: serialport2.patch
Type: text/x-diff
Size: 2495 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20071202/dccb47c1/attachment.bin 

More information about the Mono-devel-list mailing list