Microsoft KB Archive/327257

= BUG: &quot;Illegal Operation&quot; Error Message When a Program Reads a Corrupted Image by Using OleLoadPicture =

Article ID: 327257

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft Windows 98 Standard Edition
 * Microsoft Windows 98 Second Edition
 * Microsoft OLE Programming

-



This article was previously published under Q327257



SYMPTOMS
If a program uses the OleLoadPicture application programming interface (API) when it loads a corrupted Graphics Interchange Format (GIF) image, you may receive the following error message:

This program has performed an illegal operation and will be shut down.

The exact symptoms in the program may vary depending on how the program was written. However, in most cases, the program closes. When you run the program under a debugger, you see that the failure occurs in Asycfilt.dll.

This problem also affects programs that were written in Microsoft Visual Basic that use the Picture Box instrinsic control.



CAUSE
This problem occurs because of a bug in the OLE Automation libraries that are provided by Microsoft.



RESOLUTION
To avoid this problem, do one of the following:
 * Do not use corrupted GIF files. For example, if the GIF will not display in Microsoft Internet Explorer, the GIF is corrupted.
 * Ask the vendor of the program for a version that either does not rely on the OleLoadPicture API or verifies the GIF before the program loads it.
 * Run the program on an operating system that supports a fixed version of the OLE Automation libraries. See the &quot;More Information&quot; section of this article for details.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
Versions of the OLE Automation libraries that do not experience this problem are available for Microsoft Windows NT 4.0, Microsoft Windows 2000, and Microsoft Windows XP. This problem is also fixed in Windows XP Service Pack 1.

