Am I doing this right? (File byChunk)

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Sep 13 08:57:59 PDT 2010


Yes, because LPARAM is defined in the DFL library as a long. Actually,
it's hardcoded, there's no static if or versioning. I'll keep an eye
on that for when DMD is able to build 64bit binaries.

On Mon, Sep 13, 2010 at 1:09 PM, bearophile <bearophileHUGS at lycos.com> wrote:
> Andrej Mitrovic:
>
>> foreach (ubyte[] buf; file.byChunk(4096))
>> {
>>       sendEditor(SCI_ADDTEXT, buf.length, cast(LPARAM)buf.ptr);
>> }
>> ...
>> SCI_ADDTEXT(int length, const char *s)
>
> Keep in mind that the length of a D array is a size_t, this means a 32 or 64 bit long unsigned word.


More information about the Digitalmars-d-learn mailing list