.Net Framework 2.0 SerialPort - How do I get win32 handle?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
Topic more or less says it all. I'm using the SerialPort class and need to
get the win32 handle of the COM port. Any way of getting it?

Thanks in advance.
Dror.
 
Wouldn't you just use COM1, COM2, etc.? I'm not sure what you need the
Win32 handle since the SerialPort class should be taking care of this for
you. Elaborate on what you're trying to do.
 
Hi,

Sorry, I do not think there is a way. I've put in a request for this and a
couple of other enhancements.

I agree that it is important that the handle be exposed.

If this is critical (such as for configuring Transmit timeout), you can
consider using DesktopSerialIO from my homepage -- while its object model is
simpler than that of SerialPort, it does expose the handle, etc. (though I
provide a method to change timeouts, so...).

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
Thanks for the reply. Not the answer I hoped to hear, but, ho well, this
mean there is more coding work for me to do, so off to do it.
 
Back
Top