Microsoft KB Archive/246313

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Article ID: 246313

Article Last Modified on 5/12/2003


  • Microsoft Visual FoxPro 3.0b Standard Edition, when used with:
    • Microsoft Windows NT 4.0
  • Microsoft Visual FoxPro 5.0 Standard Edition, when used with:
    • Microsoft Windows NT 4.0
  • Microsoft Visual FoxPro 5.0a, when used with:
    • Microsoft Windows NT 4.0
  • Microsoft Visual FoxPro 6.0 Professional Edition, when used with:
    • Microsoft Windows NT 4.0

This article was previously published under Q246313


Icon files (*.ICO) usually have two or more resources contained within them. Each resource can be built with a different number of colors. Viewing an icon file that has a 32x32 resource that was built with greater than 256 colors causes the Visual FoxPro (VFP) versions mentioned above to exit. This occurs when Visual FoxPro is running on Microsoft Windows NT.


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


Steps to Reproduce Behavior

From Visual FoxPro, you can get a dialog to view an icon in a number of ways: assigning an .ico to a project, through the PICTURE property of an image control, and so forth. The easiest way to reproduce this, however, is with GETPIC().

  1. Using Impact Software's Microangelo (information available on their Web site at:, or some other icon editor, create an icon. Include a 32x32 resource with more than 256 colors.
  2. Open one of the Visual FoxPro versions listed above and execute the following command from the Command window:

    ? GETPIC()
  3. When the dialog box appears, locate the icon created in step 1. Select the icon and PREVIEW it (using either the preview checkbox or button).

Using Visual FoxPro 6.0 (no service pack), the following error might occur and then Visual FoxPro exits:

Fatal error: Exception code=C0000005

Using Visual FoxPro 5.0x and Visual FoxPro 6.0 SP3, the following error might occur and FoxPro exits or VFP shuts down without reporting an error:

APPLICATION ERROR. The instruction at <memory address> referenced memory at <memory address>. The memory could not be "read".

(c) Microsoft Corporation 1999, All Rights Reserved. Contributions by Trevor Hancock, Microsoft Corporation.


The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

Keywords: kbbug kbxbase kbpending KB246313