ATEasy File IO with Binary Files
Michael C.
El Segundo, CA

Sep 12, 2017
7 Posts

ATEasy File IO with Binary Files


I am attempting to access a firmware binary file (file extension *.bin) within ATEasy.  I seem to have no issues with FileOpen if I use the default setting (any other options will return a -1).  However, FileRead will never work and always returns a -1.  

I am just curious on limitations of the FileRead and general File IO procedures for ATEasy and if there are anyways around this?

Mike C.

Solution Available
Jason D.
Irvine, CA

Sep 13, 2017
32 Posts

Re: ATEasy File IO with Binary Files

Hi Mike,

I tried reading an ATEasy program binary file (.prg) and it worked fine.
Here is what I used. I was able to write to a string or an array of bytes.
lBytesRead=FileRead(hFile, aucBytes, , , )
lBytesRead=FileRead(hFile, sRead, , , )

aucBytes is an array of bytes.
sRead is a string.
lBytesRead returns 1024 for both types.

As for the limitations, they are the same as Windows API CreateFile and ReadFile.


Michael C.
El Segundo, CA

Sep 22, 2017
7 Posts

Re: ATEasy File IO with Binary Files

Hi Jason,

Okay that worked, I totally misread the tech doc on this and used the wrong datatype for the file read output.


Please Note
You need to have a M@GIC account to participate in the Forums.
Not yet registered on our website? Click here to register today!

All content, information and opinions presented on the Marvin Test Solutions User Forums are those of the authors of the posts and messages and not Marvin Test Solutions'. All attachments and files are downloaded at your own risk. [Read More]