From: wangzhong on
Hello.

I have written a modem comunication app and got a very strange problem.

When CE_RXPARITY error is catched by my app, I use ClearCommError()
to reset this error. but COM access become abnormally since this connntion.
My app only can get the first telegram from any connection.

It is failed to repair this problem that I tried to reopen the serial port,
But if I close my app, then I reopen it, the com port become normally.

I use CreateFile() to open serial port, CloseHandle() to close serial port.
Why can I didn't get the same result as application restart.

Any help would be greatly appreciated.

---------------------------
wz


From: Arkady Frenkel on
Try to use devcon from DDK to check port status and disable/enable the port
Arkady

"wangzhong" <wzhy2000(a)hotmail.com> wrote in message
news:eQe%23e1G2FHA.2964(a)TK2MSFTNGP09.phx.gbl...
> Hello.
>
> I have written a modem comunication app and got a very strange problem.
>
> When CE_RXPARITY error is catched by my app, I use ClearCommError()
> to reset this error. but COM access become abnormally since this
> connntion.
> My app only can get the first telegram from any connection.
>
> It is failed to repair this problem that I tried to reopen the serial
> port,
> But if I close my app, then I reopen it, the com port become normally.
>
> I use CreateFile() to open serial port, CloseHandle() to close serial
> port.
> Why can I didn't get the same result as application restart.
>
> Any help would be greatly appreciated.
>
> ---------------------------
> wz
>
>


From: Arkady Frenkel on
Additionally : good one is restart command of devcon
Arkady

"Arkady Frenkel" <arkadyf(a)hotmailxdotx.com> wrote in message
news:OCMkFYL2FHA.464(a)TK2MSFTNGP15.phx.gbl...
> Try to use devcon from DDK to check port status and disable/enable the
> port
> Arkady
>
> "wangzhong" <wzhy2000(a)hotmail.com> wrote in message
> news:eQe%23e1G2FHA.2964(a)TK2MSFTNGP09.phx.gbl...
>> Hello.
>>
>> I have written a modem comunication app and got a very strange problem.
>>
>> When CE_RXPARITY error is catched by my app, I use ClearCommError()
>> to reset this error. but COM access become abnormally since this
>> connntion.
>> My app only can get the first telegram from any connection.
>>
>> It is failed to repair this problem that I tried to reopen the serial
>> port,
>> But if I close my app, then I reopen it, the com port become normally.
>>
>> I use CreateFile() to open serial port, CloseHandle() to close serial
>> port.
>> Why can I didn't get the same result as application restart.
>>
>> Any help would be greatly appreciated.
>>
>> ---------------------------
>> wz
>>
>>
>
>


From: wangzhong on
I will try to do it, thank you very much.

"Arkady Frenkel" <arkadyf(a)hotmailxdotx.com> wrote in message
news:e5jYeok2FHA.2816(a)tk2msftngp13.phx.gbl...
> Additionally : good one is restart command of devcon
> Arkady
>
> "Arkady Frenkel" <arkadyf(a)hotmailxdotx.com> wrote in message
> news:OCMkFYL2FHA.464(a)TK2MSFTNGP15.phx.gbl...
> > Try to use devcon from DDK to check port status and disable/enable the
> > port
> > Arkady
> >
> > "wangzhong" <wzhy2000(a)hotmail.com> wrote in message
> > news:eQe%23e1G2FHA.2964(a)TK2MSFTNGP09.phx.gbl...
> >> Hello.
> >>
> >> I have written a modem comunication app and got a very strange problem.
> >>
> >> When CE_RXPARITY error is catched by my app, I use ClearCommError()
> >> to reset this error. but COM access become abnormally since this
> >> connntion.
> >> My app only can get the first telegram from any connection.
> >>
> >> It is failed to repair this problem that I tried to reopen the serial
> >> port,
> >> But if I close my app, then I reopen it, the com port become normally.
> >>
> >> I use CreateFile() to open serial port, CloseHandle() to close serial
> >> port.
> >> Why can I didn't get the same result as application restart.
> >>
> >> Any help would be greatly appreciated.
> >>
> >> ---------------------------
> >> wz
> >>
> >>
> >
> >
>
>

From: wangzhong on
sorry, It did not work.

I want to know the difference between the app restart and the com restart
about serial port initializtion

------or------

When COM port is opened first in a process, what is done for COM
initializtion
in Windows kernel ?


"wangzhong" <wzhy2000(a)hotmail.com> wrote in message
news:O7qk6br2FHA.700(a)TK2MSFTNGP15.phx.gbl...
> I will try to do it, thank you very much.
>
> "Arkady Frenkel" <arkadyf(a)hotmailxdotx.com> wrote in message
> news:e5jYeok2FHA.2816(a)tk2msftngp13.phx.gbl...
> > Additionally : good one is restart command of devcon
> > Arkady
> >
> > "Arkady Frenkel" <arkadyf(a)hotmailxdotx.com> wrote in message
> > news:OCMkFYL2FHA.464(a)TK2MSFTNGP15.phx.gbl...
> > > Try to use devcon from DDK to check port status and disable/enable the
> > > port
> > > Arkady
> > >
> > > "wangzhong" <wzhy2000(a)hotmail.com> wrote in message
> > > news:eQe%23e1G2FHA.2964(a)TK2MSFTNGP09.phx.gbl...
> > >> Hello.
> > >>
> > >> I have written a modem comunication app and got a very strange
problem.
> > >>
> > >> When CE_RXPARITY error is catched by my app, I use ClearCommError()
> > >> to reset this error. but COM access become abnormally since this
> > >> connntion.
> > >> My app only can get the first telegram from any connection.
> > >>
> > >> It is failed to repair this problem that I tried to reopen the serial
> > >> port,
> > >> But if I close my app, then I reopen it, the com port become
normally.
> > >>
> > >> I use CreateFile() to open serial port, CloseHandle() to close
serial
> > >> port.
> > >> Why can I didn't get the same result as application restart.
> > >>
> > >> Any help would be greatly appreciated.
> > >>
> > >> ---------------------------
> > >> wz
> > >>
> > >>
> > >
> > >
> >
> >
>

 |  Next  |  Last
Pages: 1 2
Prev: OpenThread
Next: Matching a volume to a device