Hi Cesar,
>But what about when running from the EXE ?
>Maybe the best would be to check first if the image is embedded in the EXE, and then look at the disk ? Maybe this could bring a better performance ?
Checking for a file is pretty quick. VFP does it all the time. What I would do, though, is to check what kind of file it is before calling the GDI+ functions instead of relying on error messages returned by the GDI+ functions. What might speed up things is to maintain a list of files that are included. Checking a string for a name should be faster than checking on disk.
>Is there a specific reason that you used the API RTLMOVEMEMORY instead of SYS(2600)
Well, I just translated Karl's code more or less literally.
> Are they the same ?
No, SYS(2600) copies memory whereas RTLMOVEMEMORY moves memory around. SYS(2600) is the better version because you won't suddenly end up with an empty string after calling the API function.
> In MSDN, they say that the most recommended is to use HEAP functions. Are they really faster ?
I haven't done any testing, but would assume that faster is meant for C programmer that have a different view on this. The overhead of calling an API function at all in VFP is a multiple of the entire execution time of the API function.
--
Christof