Is the process for WriteFile(int) the same with floating points?

I need to write the numbers written in an array of FPU.

Thanks,
Flip
Posted on 2010-08-02 14:26:53 by l flipboi l
WriteFile doesn't care what you're writing, it treats your data as an array of bytes. Thus, the code to write a 4-byte REAL4 is exactly the same as writing a 4-byte DWORD. Remember that you specify a pointer to your data (using the addr keyword), not the value itself.

I need to write the numbers written in an array of FPU.
This part needs some serious rephrasing :) - but I assume you mean you want to write out an array of floating-point values?
Posted on 2010-08-02 15:54:21 by f0dder
That's correct, thanks.

I need to write the values of a FPU array to a file.

Now, i'm stuck with the declarations....

Assuming my FPU has this value:

is this right?


-------------

.DATA

var1 REAL8 1.2, 2.3
var1Ptrs REAL8 var1
var1Size = SIZEOF var1

BytesWritten DWORD ?
------------


INVOKE WriteFile,
FileHandle,
var1Ptrs,                ;pointer to FPU
var1Size,              ;size of FPU
ADDR BytesWritten,
0

I seem to be missing something...





Posted on 2010-08-02 17:24:32 by l flipboi l