Open WilliamAtSamraksh opened 10 years ago
Update. This works for COM1 but throws an exception for others that I've tried.
I'm changing this to a request that a meaningful exception message be given; something like "Port name must be COM1". It should be possible to do this in the interop, before it gets down to the native code.
Is there a way to communicate the "COM1" string to users, either in code in a Microsoft DLL or eMote DLL, or enumeration during execution, or in the user manual? The device COM port could easily confuse users since we already place burden on users to figure out which Windows COM port number to use. And the hard-coded string affects code portability.
An enumeration (or a class) is plausible since the choices are so limited . It would mean extending the SerialPort class to include an overload for the enumeration.
In an ADAPT program, executing
results in an exception:
I'm using a relatively recent build of eMote for ADAPT, one that has the fix for ADC in it.