Il 05/02/2009 15.17, Viktor Szakáts ha scritto:
Thanks for clarifying, I still agree with you.
Thank you
If you ask me, I'd rather fully ignore the explicitly passed
length parameter, as the only result of that is potential
buffer overrun and big security holes (and/or more complicated
and bug-prone interface code) potentially resulting in easy
to make fatal mistakes on the .prg level. I've fixed FWRITE()
and BASE64() conversion just recently in this regard. Anyhow
if someone doesn't want to pass the full string, we have 'LEFT()'
there to help, and there is little point in replicating this functionality
in each API functions. IMO.
Generally speaking, while keeping a more or less transparent
WINAPI layer, we should also try to blend into the Harbour
language as much as possible. Not being a hardcore WINAPI
user for me it's difficult to tell any specifics, but it's probably
a matter of balancing between what feels natural for a Harbour
programmer while giving a straight as possible WINAPI interface.
If in doubt I'd personally in all cases prefer to favour the "Harbour
feel". "Harbour feel" means that .prg programmer shouldn't be
able to cause a GPF/memory corruption using .prg level
WINAPI calls.
This is ok for me, just to decide if we have to keep positional order,
also if then we ignore length, but only to have closest implementation
to ms syntax and use their docs as valid reference.
Best regards,
Francesco
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour