Vidaya, Could U please send me the class for the same...
Dear expert,
I am tring to communicate with a serial port. and I am using C# with .NET 1.1
and machine is XP. I have HSM(Host security module by THALES) to connect
with the following settings...
m_CommPort_obj.BaudRate = 9600;
m_CommPort_obj.ByteSize = 8;
m_CommPort_obj.Parity = 2;
m_CommPort_obj.PortNum = 1;
m_CommPort_obj.ReadTimeout = 100;
m_CommPort_obj.StopBits = 1;
I am using
http://www.aciss.com/justin/JustinIO.zip, a class for the comm
and I am able to open, write on the port But unable to read the data from it.
Could anybody suggest, whats wrong with the code or settings ? and on which
bemt I should read.?
I do not want to use MSCOmm.ocx. Actually i am looking for the " running
code" in .NET(vb or C#) having method sends and receive data from the serial
port. On google, I have gone through almost all the link and get a lots of
code..... but not running, if running ... its with a lots of error. So if U
have tested code please give me the calss at least so that I can work with.
Thanks in ur anticipation
Reply me on "ra***********@3i-infotech.com" and
ra*******@gmail.com
Rakesh.
"Vidya Bhagwath" wrote:
"John Puopolo" <jo**********@fastsearch.com.nospam> wrote in message news:<#l**************@TK2MSFTNGP09.phx.gbl>... Hi..
Also, the "general" answer to this is to see DllImport documentation. The
doc explains how you need to "reconstruct" C/C++ structures in C# to
manipulate them correctly. The Marshal class (under the covers) takes care
of passing the data correctly between unmanaged (C/C++) and managed (C#)
code.
John Puopolo
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:uX**************@TK2MSFTNGP10.phx.gbl... Hi,
Take a look at an article from MSDN magazine that explain how to interact
with the serial port.
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Vidya Bhagwath" <vi************@gmail.com> wrote in message
news:85**************************@posting.google.c om...
> Hello Experts,
> I am porting the C++ code into the Visual C#.NET. My C++ code is
> mainly based on the serial communication. So I am using the windows
> structure such as DCB.. etc and the windows functions frequently in my
> C++ code. I came to know how to import the windows functions into
> Visual C#.NET. But what is the method to import windows structure into
> Visual C#.NET?
>
> It will be very helpful for me if anybody can give me the WebID that
> has information regarding importing the windows functions and the
> structure into the Visual C#.NET
>
> Thanks in advance for any help.
>
> Regards,
> Vidya Bhagwath
Hi All,
I was sucessfully able to import Windows serial communication
structure into Visual C#.NET by following your suggestions. Thank you
very much for your guidance.
Regards,
Vidya Bhagwath