#2 support more COM port after COM10

open
None
5
2005-04-16
2005-04-11
Huang Kai
No

When i use the library to open COM port 15, it throws
exception:
NUnit_Tests.Serial.OpenClose :
OpenNETCF.IO.Serial.CommPortException : CreateFile
Failed: 123
at OpenNETCF.IO.Serial.Port.Open() in
C:\develop\projects\mobilesuite\source\SerialPort\Win32CE\Port.cs:line
365
at OpenNETCF.IO.Ports.Streams.WinStream..ctor(Int32
baudRate, Int32 dataBits, Boolean discardNull, Boolean
dtrEnable, Handshake handshake, Parity parity, Byte
parityReplace, String portName, Int32 readBufferSize,
Int32 readTimeout, Int32 receivedBytesThreshold,
Boolean rtsEnable, StopBits stopBits, Int32
writeBufferSize, Int32 writeTimeout) in
C:\develop\projects\mobilesuite\source\SerialPort\Win32CE\WinStream.cs:line
61
at OpenNETCF.IO.Ports.SerialPort.Open() in
c:\develop\projects\mobilesuite\source\serialport\serialport.cs:line
234
at NUnit_Tests.Serial.OpenClose() in
c:\develop\projects\mobilesuite\source\tests\serial.cs:line
42

Discussion

  • Yuri Astrakhan
    Yuri Astrakhan
    2005-04-16

    • assigned_to: nobody --> yurochek
     
  • Carl
    Carl
    2005-08-30

    Logged In: YES
    user_id=1314904

    I've had the same problem using a bluetooth device mapped to
    COM12. Works perfectly with COM9. But when trying to open
    COM12, it throws an exception. Here is more info on the
    exception:

    OpenNETCF.IO.Serial.CommPortException
    Source "SerialPort" String
    Message "CreateFile Failed: 2" String

    StackTrace " at OpenNETCF.IO.Serial.Port.Open() in
    C:\Documents and Settings\user\My Documents\Visual Studio
    Projects\sourceforge\serialportnet\source\SerialPort\Win32CE\Port.cs:line
    364
    at OpenNETCF.IO.Ports.Streams.WinStream..ctor(Int32
    baudRate, Int32 dataBits, Boolean discardNull, Boolean
    dtrEnable, Handshake handshake, Parity parity, Byte
    parityReplace, String portName, Int32 readBufferSize, Int32
    readTimeout, Int32 receivedBytesThreshold, Boolean
    rtsEnable, StopBits stopBits, Int32 writeBufferSize, Int32
    writeTimeout) in c:\documents and settings\user\my
    documents\visual studio
    projects\sourceforge\serialportnet\source\serialport\win32ce\winstream.cs:line
    58
    at OpenNETCF.IO.Ports.SerialPort.Open() in c:\documents
    and settings\user\my documents\visual studio
    projects\sourceforge\serialportnet\source\serialport\serialport.cs:line
    205