Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   find hex codes in files (https://www.delphipraxis.net/26436-find-hex-codes-files.html)

scp 24. Jul 2004 17:25

Re: find hex codes in files
 
My example was especially for the case you described: You said, yo don't know if there are more than 3 spaces.

To your question:
Delphi-Quellcode:
Buffer: array[0..6] of char;
buffer2: array[0..3] of char;
After writing to the buffer, you should use
Delphi-Quellcode:
Buffer[6] := #0;
Buffer2[3] := #0;
because then you can use it as a nullterminated string
Delphi-Quellcode:
version := version + StrPas(Buffer);
//...
version := version + StrPas(Buffer2);
A simple + doesn't work in most cases.


Alle Zeitangaben in WEZ +1. Es ist jetzt 14:15 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz