Groups | Search | Server Info | Login | Register


Groups > comp.lang.pascal.delphi.misc > #717

Re: Delphi D4: using pointers to transfer data from COMM queue to circular queue

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Hans-Peter Diettrich <DrDiettrich1@aol.com>
Newsgroups comp.lang.pascal.delphi.misc
Subject Re: Delphi D4: using pointers to transfer data from COMM queue to circular queue
Date Fri, 19 Aug 2016 12:27:25 +0200
Lines 21
Message-ID <e1o5mnFhoooU1@mid.individual.net> (permalink)
References <np68cv$irr$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net BZSOxuSJKxQsjLJAsnVFUQnXCzjvla4jiESHo5OAGM8SdAE0Nx
Cancel-Lock sha1:Cl338JI0pohPFzN8k9qCRIBXAzc=
User-Agent Thunderbird 2.0.0.21 (Windows/20090302)
In-Reply-To <np68cv$irr$1@dont-email.me>
Xref csiph.com comp.lang.pascal.delphi.misc:717

Show key headers only | View raw


P E Schoen schrieb:
> I have an application that uses a serial port component to read and 
> write data through a USB serial port at 57.6 kb. Originally I used the 
> SerialNG component and with some tweaking I was able to get it to work 
> reliably. But it has problems with Win10, so I changed the code to use 
> ComDrv32, which works when used in a simple TTY demo.

I don't remember what prevented programs from using the asynchronous I/O 
API. 57kbd also doesn't look like a dangerous transmission speed.


> I had to use a separate PChar pointer RecdPtr, and I also had to use an 
> integer for the pointer arithmetic. Apparently Delphi does not allow 
> RecdPtr := RecdPtr + (DataSize - (MAXCOMM-CommBufferPtr) ); RecdPtr + n 
> is OK. I'm not sure if I could just advance the DataPtr in the same way, 
> since it is declared as a generic Pointer type.

Delphi allows pointer math only with PCHAR. At least I'd use Cardinal 
instead of Integer, in a workaround.

DoDi

Back to comp.lang.pascal.delphi.misc | Previous | NextPrevious in thread | Find similar


Thread

Delphi D4: using pointers to transfer data from COMM queue to circular queue "P E Schoen" <paul@pstech-inc.com> - 2016-08-19 02:19 -0400
  Re: Delphi D4: using pointers to transfer data from COMM queue to circular queue "P E Schoen" <paul@pstech-inc.com> - 2016-08-19 03:58 -0400
    Re: Delphi D4: using pointers to transfer data from COMM queue to circular queue "P E Schoen" <paul@pstech-inc.com> - 2016-08-19 04:42 -0400
      Re: Delphi D4: using pointers to transfer data from COMM queue to circular queue Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2016-08-19 12:34 +0200
    Re: Delphi D4: using pointers to transfer data from COMM queue to circular queue Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2016-08-19 12:30 +0200
      Re: Delphi D4: using pointers to transfer data from COMM queue to circular queue "P E Schoen" <paul@pstech-inc.com> - 2016-08-19 20:54 -0400
        Re: Delphi D4: using pointers to transfer data from COMM queue to circular queue Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2016-08-20 12:43 +0200
          Re: Delphi D4: using pointers to transfer data from COMM queue to circular queue "P E Schoen" <paul@pstech-inc.com> - 2016-08-20 19:15 -0400
            Re: Delphi D4: using pointers to transfer data from COMM queue to circular queue Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2016-08-21 12:50 +0200
              Re: Delphi D4: using pointers to transfer data from COMM queue to circular queue "P E Schoen" <paul@pstech-inc.com> - 2016-08-22 07:12 -0400
  Re: Delphi D4: using pointers to transfer data from COMM queue to circular queue Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2016-08-19 12:27 +0200

csiph-web