468,463 Members | 2,034 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,463 developers. It's quick & easy.

Serial Port Access in XP

Hi,

I am trying to access Serial Port in XP. I am using Dev-C++ IDE that
uses Mingw as a compiler. I just want to know how I can open up serial
port on COM1 and write some data. I have searched quite a bit over the
web and could not find anything useful. I don't want to use Visual C++
or Cygwin, linux, etc. If any of you guys have some little tid bit of
code that would be great to look at.

Aug 31 '06 #1
38 9343
sh******@gmail.com wrote:
I am trying to access Serial Port in XP. I am using Dev-C++ IDE that
uses Mingw as a compiler. I just want to know how I can open up serial
port on COM1 and write some data.
Your post is off-topic for comp.lang.c. Please visit

http://www.ungerhu.com/jxh/clc.welcome.txt
http://c-faq.com
http://benpfaff.org/writings/clc/off-topic.html

for posting guidelines and frequently asked questions. Thank you.

--
C. Benson Manica | I *should* know what I'm talking about - if I
cbmanica(at)gmail.com | don't, I need to know. Flames welcome.
Aug 31 '06 #2

sh******@gmail.com wrote:
Hi,

I am trying to access Serial Port in XP. I am using Dev-C++ IDE that
uses Mingw as a compiler. I just want to know how I can open up serial
port on COM1 and write some data. I have searched quite a bit over the
web and could not find anything useful. I don't want to use Visual C++
or Cygwin, linux, etc. If any of you guys have some little tid bit of
code that would be great to look at.
Hi there - it really ain't too bad to do. Take a look at this guide:
http://www.robbayer.com/cgi-bin/load.cgi?serial-win.pdf

I am making the assumption that you do not need overlapped
communication (where you are sending and receiving at the same time).
If you do, it gets more complicated as you need the application to be
multi-threaded. They go over how to do that on the MSDN website.

Best of luck!

-Mike

Sep 1 '06 #3
"nl******@gmail.com" <nl******@gmail.comwrites:
sh******@gmail.com wrote:
>I am trying to access Serial Port in XP. I am using Dev-C++ IDE that
uses Mingw as a compiler. I just want to know how I can open up serial
port on COM1 and write some data. I have searched quite a bit over the
web and could not find anything useful. I don't want to use Visual C++
or Cygwin, linux, etc. If any of you guys have some little tid bit of
code that would be great to look at.

Hi there - it really ain't too bad to do. Take a look at this guide:
http://www.robbayer.com/cgi-bin/load.cgi?serial-win.pdf

I am making the assumption that you do not need overlapped
communication (where you are sending and receiving at the same time).
If you do, it gets more complicated as you need the application to be
multi-threaded. They go over how to do that on the MSDN website.
Unfortunately, few of us here are able to evaluate whether your advice
is valid, or whether there's a better solution. The OP should post to
a newsgroup that deals with Windows XP. Quite possibly he'd get the
same advice, but the Windows experts would be able to discuss it
further.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Sep 1 '06 #4
Keith Thompson wrote:
Unfortunately, few of us here are able to evaluate whether your advice
is valid, or whether there's a better solution. The OP should post to
a newsgroup that deals with Windows XP. Quite possibly he'd get the
same advice, but the Windows experts would be able to discuss it
further.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
I see - so not only do you feel a need to criticize the OP - but you
also feel a need to call into question the knowledge of those that try
to help the OP. Could you be any less helpful? I mean honestly. What
goal are you trying to accomplish with the above quoted post? Is this
just some e-penis enlargement technique? Grow up.

-Mike

Sep 1 '06 #5
In article <11**********************@74g2000cwt.googlegroups. com>,
nl******@gmail.com <nl******@gmail.comwrote:
>Keith Thompson wrote:
>Unfortunately, few of us here are able to evaluate whether your advice
is valid, or whether there's a better solution. The OP should post to
a newsgroup that deals with Windows XP. Quite possibly he'd get the
same advice, but the Windows experts would be able to discuss it
further.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>

I see - so not only do you feel a need to criticize the OP - but you
also feel a need to call into question the knowledge of those that try
to help the OP. Could you be any less helpful? I mean honestly. What
goal are you trying to accomplish with the above quoted post? Is this
just some e-penis enlargement technique? Grow up.

-Mike
Well said, sir.

I have often wondered what goal the so-called "regulars" are trying to
accomplish. This is a classic instance of "I know what I am, but what
are you". I have no problem saying that I am a troll and proud of it.
And it is clear that I am enjoying tweaking the regulars's noses.

But what do they get out of whatever it is that they do? How does it
meet *their* psycho-sexual needs?

That's what I want to know.

Sep 1 '06 #6
nl******@gmail.com said:
Keith Thompson wrote:
>Unfortunately, few of us here are able to evaluate whether your advice
is valid, or whether there's a better solution. The OP should post to
a newsgroup that deals with Windows XP. Quite possibly he'd get the
same advice, but the Windows experts would be able to discuss it
further.
I see - so not only do you feel a need to criticize the OP - but you
also feel a need to call into question the knowledge of those that try
to help the OP.
Those Usenetters who are Windows experts are very likely to spend much of
their Usenet time checking Windows newsgroups - more so than they are
likely to spend checking comp.lang.c (just as C experts are more likely to
hang around comp.lang.c). There may well be exceptions, but the trend tends
to be that experts mooch around groups that are relevant to their area of
expertise. So if you want a good answer, it makes sense to ask in the right
group. That way, too, if you get a /bad/ answer, it's more likely to be
corrected by an expert.
Could you be any less helpful?
To me, his advice looks sound and helpful.
I mean honestly. What
goal are you trying to accomplish with the above quoted post?
He's trying to increase the probability that the OP gets a good answer from
an expert, and the best way to do that is to refer him to a group where he
is likely to find experts in the subject about which he is asking.
Grow up.
Just because you don't understand a person's action, that doesn't
necessarily make their action childish - and certainly not in the current
case.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 1 '06 #7
"Richard Heathfield" wrote:

>Keith Thompson wrote:
>>Unfortunately, few of us here are able to evaluate whether your advice
is valid, or whether there's a better solution. The OP should post to
a newsgroup that deals with Windows XP. Quite possibly he'd get the
same advice, but the Windows experts would be able to discuss it
further.
I see - so not only do you feel a need to criticize the OP - but you
also feel a need to call into question the knowledge of those that try
to help the OP.

Those Usenetters who are Windows experts are very likely to spend much of
their Usenet time checking Windows newsgroups - more so than they are
likely to spend checking comp.lang.c (just as C experts are more likely to
hang around comp.lang.c). There may well be exceptions, but the trend
tends
to be that experts mooch around groups that are relevant to their area of
expertise. So if you want a good answer, it makes sense to ask in the
right
group. That way, too, if you get a /bad/ answer, it's more likely to be
corrected by an expert.
>Could you be any less helpful?

To me, his advice looks sound and helpful.
As I see it, the advise given was to ignore a link the OP had been given.

How about the countless times that someone simply says "Use Google" with no
hints or clues as to how to go about it. Using Google results in links,
too, many of them containing information that is wrong, useless or even
harmful. I think it is idiotic beyond belief to waste bandwidth saying "Use
Google". That is about the same as saying "There is a book in the Library
of Congress that contains the answer". I am glad to see that you agree with
me. But I thought it was merely stupid, not actually harmful..
Sep 1 '06 #8
"Unfortunately, few of us here are able to evaluate whether your advice
is valid, or whether there's a better solution. The OP should post to
a newsgroup that deals with Windows XP. Quite possibly he'd get the
same advice, but the Windows experts would be able to discuss it
further." - Keith Thompson.

osmium said:
"Richard Heathfield" wrote:
<snip>
>>
To me, his advice looks sound and helpful.

As I see it, the advise given was to ignore a link the OP had been given.
I don't get that from the bit I was talking about (set out as a citation at
the top of this article). I just got "go to the right group", which seems
like good advice to me, and he put it rather more politely than do those
five summarising words.
How about the countless times that someone simply says "Use Google" with
no
hints or clues as to how to go about it.
If a Google search is necessary, the question is probably off-topic anyway.
I agree that sending people to Google isn't a great idea.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 1 '06 #9
"nl******@gmail.com" wrote:
Keith Thompson wrote:
>Unfortunately, few of us here are able to evaluate whether your
advice is valid, or whether there's a better solution. The OP
should post to a newsgroup that deals with Windows XP. Quite
possibly he'd get the same advice, but the Windows experts would
be able to discuss it further.

I see - so not only do you feel a need to criticize the OP - but
you also feel a need to call into question the knowledge of those
that try to help the OP. Could you be any less helpful? I mean
honestly. What goal are you trying to accomplish with the above
quoted post? Is this just some e-penis enlargement technique?
Grow up.
You are not the sharpest tack in the box, are you? You have
neither recognized the topic of this newsgroup, nor, apparently,
are you able to parse Keiths words above. This significantly
increases the probability that you don't know what you are talking
about, and thus the advisability of the OPs ignoring you and moving
to a suitable Windows group for his query.

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html

Sep 1 '06 #10
Keith Thompson wrote:
"nl******@gmail.com" <nl******@gmail.comwrites:
>>sh******@gmail.com wrote:
>>>I am trying to access Serial Port in XP. I am using Dev-C++ IDE that
uses Mingw as a compiler. I just want to know how I can open up serial
port on COM1 and write some data. I have searched quite a bit over the
web and could not find anything useful. I don't want to use Visual C++
or Cygwin, linux, etc. If any of you guys have some little tid bit of
code that would be great to look at.

Hi there - it really ain't too bad to do. Take a look at this guide:
http://www.robbayer.com/cgi-bin/load.cgi?serial-win.pdf

I am making the assumption that you do not need overlapped
communication (where you are sending and receiving at the same time).
If you do, it gets more complicated as you need the application to be
multi-threaded. They go over how to do that on the MSDN website.


Unfortunately, few of us here are able to evaluate whether your advice
is valid, or whether there's a better solution. The OP should post to
a newsgroup that deals with Windows XP. Quite possibly he'd get the
same advice, but the Windows experts would be able to discuss it
further.
After a quick reading of that link I found it quite OK, there were no
aparent mistakes, at least it is a start that can suffice for the
OP to get started. This is quite a normal procedure here, I have seen
a lot of UNIX advise that goes unnoticed without any remarks.

In the FAQ there are examples for DOS (yes still there). That was a time
when people here were less cold maybe. Or maybe they were all a little
bit younger who knows :-)

I find nl******@gmail.com was right to share his knowledge with the OP.

Sep 1 '06 #11

nl******@gmail.com wrote:
Keith Thompson wrote:
Unfortunately, few of us here are able to evaluate whether your advice
is valid, or whether there's a better solution. The OP should post to
a newsgroup that deals with Windows XP. Quite possibly he'd get the
same advice, but the Windows experts would be able to discuss it
further.

I see - so not only do you feel a need to criticize the OP - but you
also feel a need to call into question the knowledge of those that try
to help the OP. Could you be any less helpful? I mean honestly. What
goal are you trying to accomplish with the above quoted post? Is this
just some e-penis enlargement technique? Grow up.
The goal's clearly stated in the message, and is common sense. A few
people here know something about Windows XP. In groups that discuss
programming on Windows XP, lots of people know about programming on
Windows XP, most people there have some idea about it, and many people
are there because they are experts at it. Many people here know nothing
whatsoever about programming on any flavour of Windows. Advising
someone to ask a question where the experts in the subject congregate
is good and helpful advice.

The knowledge of everyone who posts to Usenet is always in question.
Many people who don't have a clue post answers, and their answers are
often wrong, misleading, inefficient, or less than optimal in other
ways. If they post such answers in a community of experts in the
subject, they'll either be corrected or simply drowned out by
alternative better advice. If they post in communities where there are
fewer experts in the subject, it's more likely that their advice will
be assumed to be correct. Common sense.

If you want sound advice on a subject, ask where the experts are. If
you ask elsewhere you may be lucky; or you may be fed nonsense with
much less likelihood of its being put right.

The goal of Keith's message was to help the OP get the most, the most
knowledgeable, and the best available advice in answer to his question.
That's a very helpful thing to do, Where does he criticize the OP, by
the way?

Sep 1 '06 #12
"nl******@gmail.com" <nl******@gmail.comwrites:
Keith Thompson wrote:
>Unfortunately, few of us here are able to evaluate whether your advice
is valid, or whether there's a better solution. The OP should post to
a newsgroup that deals with Windows XP. Quite possibly he'd get the
same advice, but the Windows experts would be able to discuss it
further.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>

I see - so not only do you feel a need to criticize the OP - but you
also feel a need to call into question the knowledge of those that try
to help the OP. Could you be any less helpful? I mean honestly. What
goal are you trying to accomplish with the above quoted post? Is this
just some e-penis enlargement technique? Grow up.
My goals are to keep this newsgroup as useful as possible for those of
us who want to discuss the C programming language, and to help people
who ask questions here get the best possible answers.

Neither goal is served by having detailed discussions of Windows XP in
this newsgroup. There are newsgroups that are dedicated to Windows
programming, and they're full of experts on that subject.

I did not call anybody's knowledge into question, except to say that
I'm not qualified to judge the solution that was posted. For all I
know, it may be the best possible solution to the OP's problem. But
nobody is perfect. For example, I make mistakes now and then, which
is why I wouldn't feel comfortable posting technical advice in a forum
where there are no experts who can catch my mistakes.

I did not criticize the OP; I gave him my best advice on how to find a
solution to his problem.

We have seen time and again people posting off-topic advice in this
newsgroup, and it frequently goes wrong. Sometimes the advice
contains serious errors that somebody here, just by chance, happens to
be able to correct. The solution is simple: redirect the question to
a forum full of experts on the topic. At times, I've done so *and*
offered to answer the question in the more appropriate newsgroup.

Pay attention to this newsgroup for a while, and you'll see that I'm
right.

And I'll also point out that, unlike you, I did not feel the need to
be personally insulting while making these points.

Grow up.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Sep 1 '06 #13
"osmium" <r1********@comcast.netwrites:
[...]
>>Keith Thompson wrote:
Unfortunately, few of us here are able to evaluate whether your advice
is valid, or whether there's a better solution. The OP should post to
a newsgroup that deals with Windows XP. Quite possibly he'd get the
same advice, but the Windows experts would be able to discuss it
further.
[snip]
As I see it, the advise given was to ignore a link the OP had been given.
I said no such thing. Please re-read what I *did* write; it's quoted
above.

The link in question might be just what the OP needs. I did not say
or imply that it isn't, merely that we're not able to evaluate it in
this newsgroup.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Sep 1 '06 #14
jacob navia <ja***@jacob.remcomp.frwrites:
[...]
After a quick reading of that link I found it quite OK, there were no
aparent mistakes, at least it is a start that can suffice for the
OP to get started. This is quite a normal procedure here, I have seen
a lot of UNIX advise that goes unnoticed without any remarks.
I'll try to pay more attention to that. comp.unix.programmer is, of
course, a better place for such discussions.
In the FAQ there are examples for DOS (yes still there). That was a time
when people here were less cold maybe. Or maybe they were all a little
bit younger who knows :-)

I find nl******@gmail.com was right to share his knowledge with the OP.
nl******@gmail.com would have been perfectly right to share his
knowledge *in an appropriate forum*.

Why the hell do we have to keep re-hashing this argument?

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Sep 1 '06 #15
Keith Thompson said:
jacob navia <ja***@jacob.remcomp.frwrites:
>>
I find nl******@gmail.com was right to share his knowledge with the OP.

nl******@gmail.com would have been perfectly right to share his
knowledge *in an appropriate forum*.

Why the hell do we have to keep re-hashing this argument?
Because some people are too stupid to get it first time round, or second
time round, or third time round, or fourth time round, or fifth time round,
or sixth time round, or sev...

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 1 '06 #16
On 1 Sep 2006 10:22:11 -0700, in comp.lang.c , "nl******@gmail.com"
<nl******@gmail.comwrote:
>Keith Thompson wrote:
>Unfortunately, few of us here are able to evaluate whether your advice
is valid, or whether there's a better solution. The OP should post to
a newsgroup that deals with Windows XP. Quite possibly he'd get the
same advice, but the Windows experts would be able to discuss it
further.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>

I see - so not only do you feel a need to criticize the OP -
He did not.
>but you
also feel a need to call into question the knowledge of those that try
to help the OP.
He did not do that either (except in the imagination of those whose
pride suffers no criticism). He pointed out that there is no useful
peer review of your comment here, so nobody can say whether you're
right or wrong, and that a Windwos group would be a better place to
check.
Could you be any less helpful? I mean honestly. What
goal are you trying to accomplish with the above quoted post? Is this
just some e-penis enlargement technique? Grow up.
You might want to consider the diplomatic service as a career, you're
never going to make it as a fuckwit.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Sep 1 '06 #17
Richard Heathfield wrote:
Keith Thompson said:

>>jacob navia <ja***@jacob.remcomp.frwrites:
>>>I find nl******@gmail.com was right to share his knowledge with the OP.

nl******@gmail.com would have been perfectly right to share his
knowledge *in an appropriate forum*.

Why the hell do we have to keep re-hashing this argument?


Because some people are too stupid to get it first time round, or second
time round, or third time round, or fourth time round, or fifth time round,
or sixth time round, or sev...
I disagree with you Heathfield.

If that means for you that I am stupid just know that only people whose
words I find important can insult me :-)

Others, are just like dogs that bark at me when I pass...

Have a nice day.

jacob
Sep 1 '06 #18
jacob navia said:

<snip>
>
I disagree with you Heathfield.
I'm well aware of that.
If that means for you that I am stupid
No, I don't automatically think people are stupid for disagreeing with me.
After all, I am occasionally wrong.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 1 '06 #19
Richard Heathfield wrote:
jacob navia said:

<snip>
>>I disagree with you Heathfield.


I'm well aware of that.

>>If that means for you that I am stupid


No, I don't automatically think people are stupid for disagreeing with me.
After all, I am occasionally wrong.
OK, In that case I retire my words.

Excuse me.

jacob
Sep 1 '06 #20
Keith Thompson wrote:
My goals are to keep this newsgroup as useful as possible for those of
us who want to discuss the C programming language, and to help people
who ask questions here get the best possible answers.
Being that it seems about half of the posts I see on comp lang c are
posts saying that the OP is off topic, I don't see how useful it
actually is. I just think it's a way a couple people have of making
themselves feel big.
Neither goal is served by having detailed discussions of Windows XP in
this newsgroup. There are newsgroups that are dedicated to Windows
programming, and they're full of experts on that subject.
Well gosh golly gee darn it - looks like I ruined your precious ol
newsgroup by providing an answer instead of telling somebody how he is
OT. I'm so terribly sorry.
I did not call anybody's knowledge into question, except to say that
I'm not qualified to judge the solution that was posted. For all I
know, it may be the best possible solution to the OP's problem. But
nobody is perfect. For example, I make mistakes now and then, which
is why I wouldn't feel comfortable posting technical advice in a forum
where there are no experts who can catch my mistakes.
You implied I didn't know what I was talking about by saying he should
look elsewhere for the correct answer. Don't try to act innocent.
I did not criticize the OP; I gave him my best advice on how to find a
solution to his problem.
I already gave him his solution, actually. You just told him to F off
from your precious newgroup.
We have seen time and again people posting off-topic advice in this
newsgroup, and it frequently goes wrong. Sometimes the advice
contains serious errors that somebody here, just by chance, happens to
be able to correct. The solution is simple: redirect the question to
a forum full of experts on the topic. At times, I've done so *and*
offered to answer the question in the more appropriate newsgroup.

Pay attention to this newsgroup for a while, and you'll see that I'm
right.
I do pay attention to this newsgroup - and like I said, way too many
posts here are "google it" or "post in xyz group" or "what part of
'comp.lang.c' do you not understand?" or other nonsense like that.
And I'll also point out that, unlike you, I did not feel the need to
be personally insulting while making these points.
Actually - I'm pretty sure you're the one that implied that I don't
know what I'm talking about.
Grow up.
I'm pretty sure that's the advice I gave you already. Is this one of
those games little kids play when they repeat what everybody else says
just to be annoying? I encourage you to re-read my advice.

This is my last post in this thread that is not on the topic of
accessing the serial port from within C. I, unlike the rest of you, am
actually interested in helping people. I use newsgroups to seek help
with my problems - and when I see people having problems that I know
the solution to, I offer my help. I would encourage you all to do the
same, instead of this trivial and pitiful bickering yall are resorting
to. If anybody has more questions about serial programming from within
Windows - feel free to ask me - just a couple weeks ago I had to get
overlapped serial communication working in a Windows program. (I used
GTK+ + mingw + windows API) It isn't as bad as some articles make it
out to be, but the overlapped aspect of it can be a bit tricky as it
requires a multi threaded application.

-Mike

Sep 1 '06 #21
jacob navia wrote:
After a quick reading of that link I found it quite OK, there were no
aparent mistakes, at least it is a start that can suffice for the
OP to get started. This is quite a normal procedure here, I have seen
a lot of UNIX advise that goes unnoticed without any remarks.

In the FAQ there are examples for DOS (yes still there). That was a time
when people here were less cold maybe. Or maybe they were all a little
bit younger who knows :-)

I find nl******@gmail.com was right to share his knowledge with the OP.
Hi Jacob - I used that page as a starting point for getting serial
comms working. You can pretty much just copy and paste the code and
have a working application. It is a fantastic guide, IMHO. It doesn't
cover overlapped communication - but that is an order of magnitude more
complicated and beyond what most people need.

I'm glad you agree that it is appropriate to share knowledge, even when
the topic is not 100% on topic.

-Mike

Sep 1 '06 #22
nl******@gmail.com said:
Keith Thompson wrote:
>My goals are to keep this newsgroup as useful as possible for those of
us who want to discuss the C programming language, and to help people
who ask questions here get the best possible answers.

Being that it seems about half of the posts I see on comp lang c are
posts saying that the OP is off topic, I don't see how useful it
actually is.
That's not an ideal situation, but it sure beats the situation we'd have if
we didn't remind people of the topic of this newsgroup - i.e. thousands of
off-topic posts each week, until eventually the C experts get fed up of
trying to find topical material among the dross and stop using the group,
thus depriving Usenet of a considerable amount of C expertise.
I just think it's a way a couple people have of making
themselves feel big.
It isn't. Just because you don't understand the reasons for people's
behaviour, that doesn't mean that their behaviour is selfish or malign. It
could just be that they have excellent reasons for saying what they say -
and that is the case here.
You implied I didn't know what I was talking about by saying he should
look elsewhere for the correct answer.
No, he didn't. For all he knows, you might be the principal designer of
Windows XP - or you might be the janitor at Stumpy's Fruit Emporium. You
may be an expert, or just a convincing-sounding nutcase. He has no way of
knowing which. So his proper action is to refer the OP to a newsgroup
frequented by /many/ Windows experts.
Don't try to act innocent.
Stop trying to impute guilt where there is none. If you have the best
interests of the OP at heart, you, too, will want him to use a newsgroup
where he can be sure of high-quality advice that is peer-reviewed by
acknowledged experts in the field.

<snip>

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 1 '06 #23
In article <VI********************@bt.com>,
Richard Heathfield <in*****@invalid.invalidwrote:
a whole bunch of his usual BS.

God, is this guy an idiot!

Sep 1 '06 #24
nl******@gmail.com wrote:

Being that it seems about half of the posts I see on comp lang c are
posts saying that the OP is off topic
Only to unobservant nitwits.

Brian
Sep 1 '06 #25
nl******@gmail.com wrote:
<snipped vitriol>
This is my last post in this thread that is not on the topic of
Could you rather perhaps attempt to make this your last post
in this newsgroup instead?
accessing the serial port from within C. I, unlike the rest of you, am
actually interested in helping people. I use newsgroups to seek help
with my problems - and when I see people having problems that I know
the solution to, I offer my help.
As do we all; we frequently offer to answer a question
in the appropriate newsgroup. Keith himself sometimes
says "This is offtopic here but ontopic in
comp.unix.programmer where I can answer it".

Further down I see a thread where Richard Heathfield
says that the question would be /more/ suited to
comp.programming rather than here, but attempts to answer
it anyway.

The difference between you and them is that they
would rather a question be answered by a group of
experts in a field.
I would encourage you all to do the
same, instead of this trivial and pitiful bickering yall are resorting
to.
So you feel that it's fine for me to re-post my explanation
of "how to change a cambelt" from alt....autos to here because
it just might help someone who asked about an oilchange?
If anybody has more questions about serial programming from within
Windows - feel free to ask me - just a couple weeks ago I had to get
overlapped serial communication working in a Windows program. (I used
GTK+ + mingw + windows API) It isn't as bad as some articles make it
You're a little too full of yourself; and this is
coming from someone who has done various serial
protocols (not just "serial port programming") on
8-bit, 16-bit, 32-bit and 64-bit hardware.
out to be, but the overlapped aspect of it can be a bit tricky as it
requires a multi threaded application.
I see that this is your first non-trivial program
and/or your first "serial port programming" program[1].

Well Done!

[1] All the multi-threaded serial-port programs
I've seen were "firsts". After the first one the
smart programmer generally learns the error of
their ways and writes it properly the next time.

--
goose
Have I offended you? Send flames to root@localhost
real email: lelanthran at gmail dot com
website : www.lelanthran.com
Sep 1 '06 #26
jacob navia wrote:
<snipped>
I find nl******@gmail.com was right to share his knowledge with the OP.
Of course he was, just not here, thats all.

I'd like to politely advise against ratifying responses that
are this far off-topic. As one of the regs here, you already
know why posters are redirected to appropriate groups[1].

Hell, I remember when you first came here[2] and
got dejected at the responses (IIRC, you could not
understand why no one was more supportive of your
project), but you still stayed at least fairly on-topic.

[1] And as much as I visit here, I still do stupid
things (see post above where I got chastised for
asking poster not to top-post without saying
what top-posting was) that I really should not be
doing.
[2] 3 years ago? 4?

--
goose
Have I offended you? Send flames to root@localhost
real email: lelanthran at gmail dot com
website : www.lelanthran.com
Sep 1 '06 #27
nl******@gmail.com wrote:
>
Keith Thompson wrote:
Unfortunately, few of us here are able to
evaluate whether your advice
is valid, or whether there's a better solution.
The OP should post to
a newsgroup that deals with Windows XP. Quite possibly he'd get the
same advice, but the Windows experts would be able to discuss it
further.
>
I see - so not only do you feel a need to criticize the OP - but you
also feel a need to call into question the knowledge of those that try
to help the OP.
There is a need to call into question the knowledge
of those that try to help the OP.
Everybody who posts on topic here, gets corrected once in while.
Why should somebody posting off topic, be assumed to be correct?
Could you be any less helpful? I mean honestly. What
goal are you trying to accomplish with the above quoted post?
He was alerting the OP, that the chances of getting
a wrong answer without correction,
are much smaller on a newsgroup where his question is on topic.

--
pete
Sep 1 '06 #28
Kenny McCormack wrote:
In article <VI********************@bt.com>,
Richard Heathfield <in*****@invalid.invalidwrote:
a whole bunch of his usual BS.

God,
Yes?
is this guy an idiot!
No. Next question?

--
goose
Have I offended you? Send flames to root@localhost
real email: lelanthran at gmail dot com
website : www.lelanthran.com
Sep 1 '06 #29

goose wrote:
nl******@gmail.com wrote:
<snipped vitriol>
This is my last post in this thread that is not on the topic of

Could you rather perhaps attempt to make this your last post
in this newsgroup instead?
Sorry, just failed that request.
accessing the serial port from within C. I, unlike the rest of you, am
actually interested in helping people. I use newsgroups to seek help
with my problems - and when I see people having problems that I know
the solution to, I offer my help.

As do we all; we frequently offer to answer a question
in the appropriate newsgroup. Keith himself sometimes
says "This is offtopic here but ontopic in
comp.unix.programmer where I can answer it".
Hmm - in my experience with Keith - he gave a nearly identical response
to that in this thread.
Further down I see a thread where Richard Heathfield
says that the question would be /more/ suited to
comp.programming rather than here, but attempts to answer
it anyway.
Richard seems to me to be one of the few regulars interested in helping
people.
The difference between you and them is that they
would rather a question be answered by a group of
experts in a field.
I don't feel a need to ask a group of people when one person has
already given me a good answer. But hey - that's just me.
So you feel that it's fine for me to re-post my explanation
of "how to change a cambelt" from alt....autos to here because
it just might help someone who asked about an oilchange?
If somebody asks about it, why not?
You're a little too full of yourself; and this is
coming from someone who has done various serial
protocols (not just "serial port programming") on
8-bit, 16-bit, 32-bit and 64-bit hardware.
Hmm, I've only done it so far on 8b and 32b microcontrollers (and my
32b XP system). My code would work on a 64b system. Never had a need to
use a 16b chip as none have ever met my needs. I don't see how I'm full
of myself though - I know what I think is a very good and easy answer
to his problem, and I'm offering to help if he needs help. I know my
answer works because I'm currently using it.
out to be, but the overlapped aspect of it can be a bit tricky as it
requires a multi threaded application.

I see that this is your first non-trivial program
Not at all. But it was the first where I had to get a GUI running
within windows that could access the serial port.
and/or your first "serial port programming" program[1].

Well Done!

[1] All the multi-threaded serial-port programs
I've seen were "firsts". After the first one the
smart programmer generally learns the error of
their ways and writes it properly the next time.
Huh? Is it possible to have overlapped serial comms without
multi-threading? You do know what I mean by overlapped, yes? The MSDN
article made it seem that it wasn't. Also, for my application, I can't
possibly imagine how I could do it without multi-threading, unless
there is some way for some sort of interrupt to be generated whenever a
new byte is received over the serial port. I followed the way the MSDN
article said to do it - I figure the people there probabaly have more
experience and more expertise than myself in the matter.

Seriously - if you know of a way to accomplish overlapped serial
communication - I would love to hear about it. If you feel it is off
topic for this newsgroup than please e-mail it to me, or move the topic
to a new newsgroup. Actually, come to think of it - I suppose it
probabaly is possible to do without threads I believe - by just sending
whatever you want sent using overlapped comms and then not waiting for
it to complete, and constantly checking for a new byte. Is that the
method you are referring to? I suppose that would work ok, though I
prefer the threaded method.

-Mike

Sep 2 '06 #30
In article <4l************@individual.net>,
Default User <de***********@yahoo.comwrote:
>nl******@gmail.com wrote:

>Being that it seems about half of the posts I see on comp lang c are
posts saying that the OP is off topic

Only to unobservant nitwits.
Good point. The reality is (a lot) closer to 100%.

I believe there was an actual instance of a post, written by a regular,
addressed to an outsider, that was actually useful to said outsider, I
think, back in 1997.

Sep 2 '06 #31
goose <lk************@webmail.co.zawrites:
Kenny McCormack wrote:
[snip]
Yes?
[snip]
No. Next question?
Please don't feed the troll.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Sep 2 '06 #32
"nl******@gmail.com" <nl******@gmail.comwrites:
Keith Thompson wrote:
>My goals are to keep this newsgroup as useful as possible for those of
us who want to discuss the C programming language, and to help people
who ask questions here get the best possible answers.

Being that it seems about half of the posts I see on comp lang c are
posts saying that the OP is off topic, I don't see how useful it
actually is. I just think it's a way a couple people have of making
themselves feel big.
You're mistaken. I've explained why we do what we do here.
>Neither goal is served by having detailed discussions of Windows XP in
this newsgroup. There are newsgroups that are dedicated to Windows
programming, and they're full of experts on that subject.

Well gosh golly gee darn it - looks like I ruined your precious ol
newsgroup by providing an answer instead of telling somebody how he is
OT. I'm so terribly sorry.
>I did not call anybody's knowledge into question, except to say that
I'm not qualified to judge the solution that was posted. For all I
know, it may be the best possible solution to the OP's problem. But
nobody is perfect. For example, I make mistakes now and then, which
is why I wouldn't feel comfortable posting technical advice in a forum
where there are no experts who can catch my mistakes.

You implied I didn't know what I was talking about by saying he should
look elsewhere for the correct answer. Don't try to act innocent.
I did not imply that you don't know what you're talking about with
respect to serial port access in Windows XP. For all I know, you
could be an expert on the topic. If you know anything about it at
all, you almost certainly know more about it than I do.

He would have been better off posting his question in a more
appropriate forum. You would have been better off posting your answer
in a more appropriate forum.

Both the original question and your answering it here were
understandable errors, easily corrected. It's your stubborn
insistence that (a) I've implied that you advice was incorrect rather
than off-topic, and (b) that off-topic advice is appropriate that I
find annoying.
>I did not criticize the OP; I gave him my best advice on how to find a
solution to his problem.

I already gave him his solution, actually. You just told him to F off
from your precious newgroup.
I did no such thing. I offered him advice about where to find good
information. If that information happens to include the advice you
posted here, that's great.
>We have seen time and again people posting off-topic advice in this
newsgroup, and it frequently goes wrong. Sometimes the advice
contains serious errors that somebody here, just by chance, happens to
be able to correct. The solution is simple: redirect the question to
a forum full of experts on the topic. At times, I've done so *and*
offered to answer the question in the more appropriate newsgroup.

Pay attention to this newsgroup for a while, and you'll see that I'm
right.

I do pay attention to this newsgroup - and like I said, way too many
posts here are "google it" or "post in xyz group" or "what part of
'comp.lang.c' do you not understand?" or other nonsense like that.
>And I'll also point out that, unlike you, I did not feel the need to
be personally insulting while making these points.

Actually - I'm pretty sure you're the one that implied that I don't
know what I'm talking about.
I did no such thing. I suppose I can understand why you took it that
way, but it is not what I meant.

Think about this. Suppose someone came to you with a question about
serial port access in Windows XP. Suppose you didn't have time to
answer, but wanted to suggest an appropriate Usenet newsgroup for his
question. Would you advise him to post to comp.lang.c, or to a
Windows-specific newsgroup?

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Sep 2 '06 #33
In article <ln************@nuthaus.mib.org>,
Keith Thompson <ks***@mib.orgwrote:
>"nl******@gmail.com" <nl******@gmail.comwrites:
>Keith Thompson wrote:
>>My goals are to keep this newsgroup as useful as possible for those of
us who want to discuss the C programming language, and to help people
who ask questions here get the best possible answers.

Being that it seems about half of the posts I see on comp lang c are
posts saying that the OP is off topic, I don't see how useful it
actually is. I just think it's a way a couple people have of making
themselves feel big.

You're mistaken. I've explained why we do what we do here.
Yes, you have. But, you see, the thing is, we think you are lying.

Same goes for Heathfield. You see, he can go on for pages and pages,
explaining the stock dogmatic position in gory, excruciating detail, but
we all still know he's just yanking our chains.

Sep 2 '06 #34
nl******@gmail.com said:
goose wrote:
<snip>
>The difference between you and them is that they
would rather a question be answered by a group of
experts in a field.

I don't feel a need to ask a group of people when one person has
already given me a good answer. But hey - that's just me.
Unfortunately, whilst it is often possible for Q to determine whether A's
answer is /bad/, it is not always possible to know whether it's /good/.
This is especially true in programming. For example:

Q: if I've got a number in text form, in a string, and I want it in numeric
form, how do I do that?
A: int i = (int)str;

Q knows enough about C to realise this is wrong. He might give it a whirl
anyway out of sheer desperation, but it's easily identifiable as a bad
answer (as is almost /any/ answer that includes a cast!).

But if it goes like this instead:

Q: if I've got a number in text form, in a string, and I want it in numeric
form, how do I do that?
A: int i = atoi(str);

then Q has received some advice which, when followed, certainly seems to
work. So how is he to know that it's bad advice? (Which it is.)

Had the question been asked in comp.windows.xp.whatever, then that might be
the only answer he gets. As far as he's concerned, it appears to be a
"good" answer. Nobody corrects it. Nobody nitpicks it. Maybe he even gets
two or three people suggesting it. But the /best/ answer he gets might well
be the one that goes "have you considered asking the folks in comp.lang.c?"
Because over in comp.lang.c we could not only give him the right answer to
the question but also explain why the answer he already received, whilst
beguilingly close, is not actually a good answer after all.

Horses for courses. C experts tend to stick around here, and Windows experts
tend to stick around Windows groups, and Linux experts stick around Linux
groups, and Mac experts te... well, you get the idea.

<snip>

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 2 '06 #35
On 1 Sep 2006 16:14:39 -0700, in comp.lang.c , "nl******@gmail.com"
<nl******@gmail.comwrote:
>Keith Thompson wrote:
>I did not call anybody's knowledge into question, except to say that
I'm not qualified to judge the solution that was posted.

You implied I didn't know what I was talking about
He did not. You imagined that.
>by saying he should
look elsewhere for the correct answer.
Which is absolutely correct.
>I did not criticize the OP; I gave him my best advice on how to find a
solution to his problem.

I already gave him his solution, actually.
Quite possibly, but thats unverifiable in comp.lang.c, since the
windows gurus don't hang out here..
>You just told him to F off from your precious newgroup.
Keith did no such thing. Stop being so foolishly hyperbolic.
>This is my last post in this thread that is not on the topic of
accessing the serial port from within C. I, unlike the rest of you, am
actually interested in helping people.
From your posts here to date, I disagree. You seem mainly interested
in defending your injured pride against imaginary attacks, and in
insulting the regulars.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Sep 2 '06 #36
nl******@gmail.com wrote:
Being that it seems about half of the posts I see on comp lang c are
posts saying that the OP is off topic,
Gross hyperbole.
This is my last post in this thread that is not on the topic of
accessing the serial port from within C.
Untrue.
but the overlapped aspect of it can be a bit tricky as it
requires a multi threaded application.
Untrue. I once wrote a serial port application using overlapped
I/O and it was single-threaded. In fact that was the reason for
using overlapped I/O -- so I did not have to use threads!
You implied I didn't know what I was talking about by saying he should
look elsewhere for the correct answer.
You inferred it. Big difference.

Now, why should anyone trust your answer over a bar of soap?
You have posted several false statements on this thread.
Further, you resist calls for the question to be asked on a
group where experts are present.

I can only conclude that you are trying to make yourself feel
big, by posturing as if you are helping someone, and are
afraid that you will be shown up as ignorant if a real expert
were to criticize your "answer".

Finally, you seem to be suggesting that it is OK for anyone to
ask a question anywhere on Usenet, and get an answer. If
that is so, why don't we just abolish the separate groups and
have one big group for all posts?

Amusingly, this shall be my last post on this thread that _is_
on the topic of Windows programming. If you want to take
me up on my comments about overlapped I/O then please
do so on an appropriate newsgroup.

Sep 4 '06 #37
"Old Wolf" writes:
>Being that it seems about half of the posts I see on comp lang c are
posts saying that the OP is off topic,

Gross hyperbole.
Yes, of course. This thread had 50 posts including yours. One of them is a
question, and one of them is a purported answer. The other 48 are bickering
of various kinds which are probably not helpful to the OP. Unless, as was
implied, he was too damn dumb to know, without being told, that there is
misinformation in some web links. Very possibly including the one he was
given here. I think most people are at least vaguely aware of the
possibility of misinformation without being told.

I am especially appalled at the implication that a team of vigilant, eagle
eyed, experts (all self appointed) are sitting over on the Windows
newsgroups ready to pounce on any link that contains bad information. The
only link monitoring I see going on all pertains to beginner tutorials.
Everything else gets off scot(sp?) free. *Posts* sometimes get checked,
not links.
Sep 4 '06 #38

Old Wolf wrote:
but the overlapped aspect of it can be a bit tricky as it
requires a multi threaded application.

Untrue. I once wrote a serial port application using overlapped
I/O and it was single-threaded. In fact that was the reason for
using overlapped I/O -- so I did not have to use threads!
I corrected myself on that already. I still think it's messy (at least
in my application) for it to not be multi-threaded. I also don't think
there's a way to guarantee no loss of incoming data if it's not
multi-threaded, if you're doing any sort of serious number crunching.
But what do I know - apparently I'm full of mis-information.

I've stated my peace on all topics except for serial port access in XP,
so I'm not going to be wasting bandwidth with a response to anything OT
in this thread.

-Mike

Sep 4 '06 #39

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by willie | last post: by
1 post views Thread by Otac0n | last post: by
1 post views Thread by Finn Ellermann | last post: by
reply views Thread by asam.reddy | last post: by
13 posts views Thread by Al the programmer | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kmladenovski | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.