On Wed, Jan 14, 2004 at 02:25:33PM -0800, hatky wrote: > I run a free program call The All-seeing Eye, > available for free at: > http://www.udpsoft.com/eye2/index.html > And run into a few errors like this: > err:imagelist:ImageList_Remove index out of range! 0 That's probably only cosmetic, see below
> ImageList_Remove gets(
> ????????HIMAGELIST??himl,
> ????????int??i)
>
> line 2040 of imagelist.c says:
> if ((i < -1) || (i >= himl->cCurImage)) {
> ERR("index out of range! %d\n", i);
> return FALSE;
> }
The name cCurImage in HIMAGELIST is misleading, it's not the current
image but the count of images in the imagelist (see imagelist.h).
With i=0 that means that himl->cCurImage=0 aka no images in the
imagelist. MSDN dosn't specify what to return when we try to free the
first image of an empty imagelist so this needs to be checked with a
wine test.
>
> But since
> "When an image is removed, the indexes of the
> remaining images are adjusted so that the ...."
>
> I assume most call do not include an index but only
> the handle as the case with this program from the
> trace I checked it sends 0 as the i and a true handle
> in himl and it makes since, since it first calls
> ImageList_Create to add images and ImageList_Create
> returns "Handle to the created image list" and not the
> place (remember the place changes anyway....)
> So.....
>
> I assume that in the case of the i = 0 the procedure
> should locate the i itself from the handle, am I
> right?
No, it means delete the image at position 0.
bye
michael
>
> getting close to his first patch :),
> Hatky.
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
>
--
Michael Stefaniuc Tel.: +49-711-96437-199
System Administration Fax.: +49-711-96437-111
Red Hat GmbH Email: [EMAIL PROTECTED]
Hauptstaetterstr. 58 http://www.redhat.de/
D-70178 Stuttgart
pgp00000.pgp
Description: PGP signature
