Solved

D3 and serial port under W98/NT

Posted on 1998-09-07
9
321 Views
Last Modified: 2010-04-06
hi,
i have done a nice working program which works with the serial port under W98/NT in D3.
for some tests i need to know the status of (nearly) every pin of the serial port, not only CTS or RTS. These i can get by CLEARCOMMERROR and the COMSTAT-Field.
GETCOMMMODEMSTATUS too is not the right one.
but it should not be in assembler!! i need it in D3 (or D4)!
thanks
titz
0
Comment
Question by:titz
9 Comments
 

Expert Comment

by:clopez
Comment Utility
Can you post what are you looking for?
0
 
LVL 10

Expert Comment

by:viktornet
Comment Utility
Here is some assembler even thought you said not to use assembler...

//Read port
function ReadPortB( wPort : Word ) : Byte;
begin
  asm
    mov dx, wPort
    in al, dx
    mov result, al
   end;
end;

//Write To Port
procedure WritePortB( wPort : Word; bValue : Byte );
begin
  asm
    mov dx, wPort
    mov al, bValue
    out dx, al
  end;
end;

Anyway, I hope you find it useful some how... =)

Regards,
Viktor Ivanov
0
 
LVL 20

Expert Comment

by:Madshi
Comment Utility
viktornet,

nice but doesn't work with winNT... There are little freeware components for NT, but I don't know where you can get them and how their name is.

Regards, Madshi.
0
 

Expert Comment

by:clopez
Comment Utility
I have a comm component that check the Break, CTS, DRS, Error, Ring, Rlsd, RxChar, RxFlag, TxEmpty and its freeware.  Send me an e-mail if you want it.

0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Expert Comment

by:BlackDeath
Comment Utility
whoops.
lopez -

would u do me a favour & send it to me, too?
andreas.naguschewski@vt.siemens.de

Black Death.
0
 
LVL 1

Author Comment

by:titz
Comment Utility
hi clopez,

my email adress is
peter.helm@t-online.de
send it to me and you will have the points.

0
 
LVL 1

Author Comment

by:titz
Comment Utility
hi victornet,

i do not want to use assembler, for it will work now under perhaps WIN95. but i fear, that it will not work under microsofts next system. and it will not work under win nt.
therefore i will use the API.
tnx !
titz

0
 

Accepted Solution

by:
clopez earned 100 total points
Comment Utility
I have sent the file to both of you.

The file name is Async32.zip and you can find it also at DSP:

   http://SunSITE.icm.edu.pl/delphi/

Under Delphi 3/All files

Hope it works.
0
 
LVL 1

Author Comment

by:titz
Comment Utility
hi clopez,

thanks for th quick posting of the Conn-Component.
titz

0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now