Top.Mail.Ru Yandeks.Metrika
Forum: "System";
Current archive: 2003.05.01;
Download: [xml.tar.bz2];


An interesting question about working with COM port Find similar branches

nickn   (2003-03-10 13:45) [0]

It is known that it is possible to work with a port as with a regular file.
through the API.
Is it possible to work with it using standard DELPHI tools?
Ie read / write with read / write and is there any
a procedure setting exchange parameters, i.e.
speed etc etc

int64   (2003-03-10 15:10) [1]

As I understand it: “standard DELPHI means” is to click the mouse on the form?
There are such tools, dohrena. Only they are not quite standard - they are not part of Delphi.
Look at the torre and the pantries.

y-soft   (2003-03-10 17:32) [2]

You can really work with all those functions that are used to work with files. But for tuning, completely different functions are used, and there are many subtleties.
So either MSDN read, or use ready-made components

jack128   (2003-03-10 23:32) [3]

If you decide to use the functions Read, Write, then you can get the port handle
var F: File; h: THandle;
h: = TFileRec (F) .Handle;

Forint   (2003-03-11 10:19) [4]

Do not look for problems on your head. All the same, all the port settings will be done through the API. There is no need for such a formulation of the problem. Well, if you understand laziness - find the finished component (and they are very curves ...)

Фрол   (2003-03-11 12:21) [5]

Used at one time component AsyncPro.
Recommend ! Especially suitable for working with non-standard iron.

pasha676   (2003-03-11 14:45) [6]

> It is known that it is possible to work with a port as with a regular file.
> through the API.

I would not say that as with a regular file. CreateFile, Read, Write - and that’s probably it. Files have neither DCB, nor event for the arrival of characters, nor the transfer rate.

> Is it possible to work with it using standard DELPHI tools?
> Ie read / write with read / write and is there any

Not. You work with API tools either through an assembler or through procedures and components that work through an API or an assembler.
All functions that set the parameters of the port are given in the help by SDK.

jack128   (2003-03-11 17:25) [7]

2 pasha676

> Is it possible to work with it using standard DELPHI tools?
> Ie read / write with read / write and is there any

> No.

var f: file;
AssignFile (f, "\\. \ Co; ok; em1");
reset (f, 1);
closefile (f);

everything works fine ...
and read (), and write () will also work - these functions are the same as CreateFile (), ReadFile, WriteFile () - only masked ...

But it’s really not worthwhile to work, luchshe than what thread the components should be, the benefit of them in bulk ...

pasha676   (2003-03-11 17:48) [8]


How would the API provide good features - for example, the event on the arrival of a carriage return character or on the release of the input buffer. Or, for example, set DTR. Implementing it in this terminology is impossible.
Components, IMHO, also should not be used. It is better to learn API - it is not difficult (it is very simple !!!), and then come in handy for a long time.

Moderators and fathers founders of the site !!!

There is a hurt little articles with primerchik. There, in brief, an example describes how to work with a com port (including organizing events and parallel streams for this purpose). I already got these questions. If there is a desire - let's finish the article, post it on your site. Well, already tired of looking at this disgrace! If you have an interest write, pliz.

jack128   (2003-03-12 21:02) [9]

It’s necessary to teach Api - I don’t argue, but you don’t argue about the components, they save a lot of time .. Besides, it’s convenient to learn about their source components (for example, TCommPortDriver is a very convenient component, with source codes)

And I would love to read the article ...

Ну   (2003-03-13 02:01) [10]

you (pasha676 (11.03.03 17: 48)), damn you give!
If there is a desire and opportunity, write an article and send it. What is the interest of the authors of the site are you waiting for? The site operates at no cost. Creators and accompanying nobody pays. So do not expect to be asked to take the initiative.

nickn   (2003-03-13 14:43) [11]

Guys, thank you all, but
the problem is that this program (which works with the com-port) can be transferred to Linux without serious consequences

Anatoly Podgoretsky   (2003-03-13 16:28) [12]

pasha676 (11.03.03 17: 48)
That if you have a desire to get a place to publish an article, then offer it for publication.

Pages: 1 whole branch

Forum: "System";
Current archive: 2003.05.01;
Download: [xml.tar.bz2];


Memory: 0.59 MB
Time: 0.033 c
2003-04-20 04:51
How to edit1.text of one program put edit1.text another?

2002-11-17 19:35
SLD format AutoCAD

Dmitry Baranov
2003-04-13 16:48
Matching BLOB data types and ORACLE

2003-04-11 20:32
Where to download the assembler?

2003-03-06 10:15
Low-level floppy read / write

afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic Indonesian Irish italian Japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Spanish swahili Swedish ภาษาไทย turkish Ukrainian urdu Tiếng Việt welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada Khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
English French German Italian Portuguese Russian Spanish