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.

Re: .Net Framework 2.0 SerialPort - How do I get win32 handle? by Christopher

Christopher
Sun Jun 04 19:49:06 CDT 2006

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.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

"Dror Hershkovitz." <Dror Hershkovitz.@discussions.microsoft.com> wrote in
message news:248E5CC6-B0AB-454B-8FE6-76FDEE2938AF@microsoft.com...
> 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.



Re: .Net Framework 2.0 SerialPort - How do I get win32 handle? by Dick

Dick
Mon Jun 05 10:14:47 CDT 2006

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.



Re: .Net Framework 2.0 SerialPort - How do I get win32 handle? by DrorHershkovitz

DrorHershkovitz
Tue Jun 06 07:15:01 CDT 2006

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.