Serial Port Access in XP

S

shussai2

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.
 
N

nleahcim

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
 
K

Keith Thompson

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.
 
N

nleahcim

Keith said:
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.

-Mike
 
K

Kenny McCormack

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.
 
R

Richard Heathfield

(e-mail address removed) said:
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.

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.
 
C

CBFalconer

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:
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
 
O

osmium

:

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.


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..
 
R

Richard Heathfield

"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:
:


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.
 
J

jacob navia

Keith said:
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 (e-mail address removed) was right to share his knowledge with the OP.
 
J

J. J. Farrell

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?
 
K

Keith Thompson

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.
 
K

Keith Thompson

osmium said:
[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.
 
K

Keith Thompson

jacob navia said:
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 (e-mail address removed) was right to share his knowledge with the OP.

(e-mail address removed) 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?
 
R

Richard Heathfield

Keith Thompson said:
(e-mail address removed) 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...
 
M

Mark McIntyre

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
 
J

jacob navia

Richard said:
Keith Thompson said:




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
 
R

Richard Heathfield

jacob navia said:

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.
 
J

jacob navia

Richard said:
jacob navia said:




I'm well aware of that.




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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top