• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

Putting #$ Auto After Hex

Started by siliconin, August 03, 2011, 04:59:28 am

Previous topic - Next topic

siliconin

Hello,
i am new currently trying demo of nrcomm i want to know if i need to send large string's like
7E A0 72 55 7E 00 00     may b more large i need to put manually #$
eg -  7E#$A0#$72#$55#$7E#$00#$00

is their any software that can do it auto as i just need to put data output should b wih #$

waiting for reply
thanks

Roman Novgorodov

Hello

Possible I don't understand you, but it seems like your question is not related with nrComm Lib.

If you want to send binary data from memory buffer, you can use SendData() methods instead SendString().

If you need to include into your source code string constants with HEX codes, you can use COPY/PASTE,  Replace in Block of text editor (replace space on #$).

Roman Novgorodov
DeepSoftware LLC
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

siliconin

Hello,
thanx for reply
i like nrcomm much its initialized and working properly sending data also but the problem in i need to send large data and on data i need to put #$ manually after hex
#$7F#$7A#$7e
I JUST WANT TO KNOW ANY EASY METHOD TO PUT #$ ?
can u give demo how to send data through nrcomm1.senddata?

Roman Novgorodov

Hello

The #$ chars are needed for compiler when you type HEX char codes into string constants into source code.

SendData can be used like following:

var
  dataBuffer:PAnsiChar;
  len:integer;
begin

  len := 3;
  dataBuffer := StrAlloc(len);

  dataBuffer[0] := $7F;
  dataBuffer[1] := $7A;
  dataBuffer[2] := $7E;

  nrComm1.SendData(dataBuffer, len);

end;


Roman Novgorodov
DeepSoftware LLC
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.