Interfacing with Comm32 Component



Hello all,

I am trying to use a Comm32 Component authored by David Wann in 1996
(http://www.programmersheaven.com/download/14247/download.aspx). I am using
WinXP and have installed Delphi 2.0 in Win95 compatibility mode. I have
installed the component in the Delphi component library and am now trying to
interface to it.

My user program interfaces to the component using a Comm32 component event
named "OnReceiveData".

The procedure in my user program is:
procedure TForm1.Comm321ReceiveData(Buffer: Pointer; BufferLength: Word);

I can't figure out how to get the characters in the Buffer (type of Pointer)
into a string that I can use in a memo control.

Roughly what I want to do is: Memo1.Lines.Append (Buffer); , but
Buffer won't automatically cast into a string.

I haven't programmed in Delphi for 10 years, and I wasn't very good then.
I've done my best to describe my question above, but I am unsure about the
terms that I've used. If something doesn't make sense, I've probably used
the wrong term to describe it.

Can somebody tell me how to get my Comm data from the Buffer variable to a
string variable?

Thanks,
Andy Massey


.



Relevant Pages

  • Re: Interfacing with Comm32 Component
    ... I am trying to use a Comm32 Component authored by David Wann in 1996. ... I am using WinXP and have installed Delphi 2.0 in Win95 compatibility mode. ... I have installed the component in the Delphi component library and am now trying to interface to it. ... I can't figure out how to get the characters in the Buffer into a string that I can use in a memo control. ...
    (alt.comp.lang.borland-delphi)
  • Re: DLL with string params callable via D4 and VB
    ... I can't get beyond Delphi ... >> Is there any guidance you could give in regards to passing string ... > - use Longint for integer types on the Delphi side, Long on the VBA side, ... > Arrays are another problem data type. ...
    (borland.public.delphi.language.objectpascal)
  • Re: Thinking Clearly
    ... often business rules change more rapidly than the technology used to ... C++ came along later we looked again since homebuilt string classes would do ... for a *very* long time MSBasic had a very stable core language. ... but if you Delphi code behaved like Delphi code ...
    (borland.public.delphi.non-technical)
  • Re: array of labels or array of buttons
    ... >>finally got a project that I can do in Delphi. ... >>time you cut and past one it asks if you want to make this an array. ... > draw the buttons in an OnDrawCell event handler of the stringgrid like ... ... > In this case I would use the Objects array of the string grid to store a value ...
    (alt.comp.lang.borland-delphi)
  • Re: Basics
    ... controls from Turbo Delphi and I managed to get things basically working ... via executing a text query and the dbgrid printing what I needed. ... I'm in position where I need to retrieve a long string and UU-hex-convert ... it into a image to the user - DBGrids help me not. ...
    (borland.public.delphi.database.ado)