user32: Check for .ico and .cur magic.
Dmitry Timoshkov
dmitry at codeweavers.com
Mon Feb 18 02:55:42 CST 2008
"Andrew Riedi" <andrewriedi at gmail.com> wrote:
> +#define ICON_DIB_SIZE 4264
It would be helpful to actually calculate the size instead of hardcoding
the magic value.
> + handle = LoadImageA(NULL, "icon.ico", IMAGE_CURSOR, 0, 0, LR_LOADFROMFILE);
> + ok(handle != NULL, "LoadImage() failed.\n");
> + error = GetLastError();
> + ok(error == 0, "Last error: %u\n", error);
> +
> + /* Clean up. */
> + ret = DestroyIcon(handle);
The fact that LoadImage has returned a not zero handle actually confirms
nothing, you need to verify the contents of the loaded image with GetIconInfo.
--
Dmitry.
More information about the wine-devel
mailing list