Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Loading binary Files

Posted on 1998-03-21
3
Medium Priority
?
151 Views
Last Modified: 2010-04-06
Hi, i've created a file format called '.OCQ'. I used it former in 16-bit BP7 - Programs. Now i want to load these files in a delphi 3 program. i know how to use BlockRead, records and Pointers in BP but not how to do that in Delphi.

thanx, Omsec ;)
0
Comment
Question by:omsec
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Expert Comment

by:egono
ID: 1360668
IMHO it's exactly the same like in BP7
0
 
LVL 2

Author Comment

by:omsec
ID: 1360669
uhm, it told me var f : file and something about Sender were not compatible, btw, is there any write command which i can use to write the data ? like WriteLn ? (onto a form)
0
 
LVL 2

Accepted Solution

by:
egono earned 90 total points
ID: 1360670
hmm try that

var f: file of byte;
    p: array [0..30000] of byte;
    l:integer;

begin
AssignFile(f,'c:\autoexec.bat');
Reset(f);
BlockRead(f,p,30000,l);
CloseFile(f);

//this is your writeln :-)
Canvas.TextOut(10,10,IntToStr(p[0]));
end;

if you read records via BlockRead from a file the right var declaration is

var myrecord : record packed
         a:byte;
         b:byte;
     end;

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question