Article ID: 200294
Article Last Modified on 8/27/2002
APPLIES TO
- Microsoft Visual FoxPro 5.0 Standard Edition
- Microsoft Visual FoxPro 5.0a
- Microsoft Visual FoxPro 6.0 Professional Edition
This article was previously published under Q200294
SYMPTOMS
When you call the
LoadPicture function from within a Visual FoxPro .app or .exe program, and you use a file name that is the same as one that is included in the project, you may receive the following OLE error:
OLE error code 0x800a01e1: Unknown COM status code.
CAUSE
Visual FoxPro first looks at the files that are included in the project, and then calls application programming interfaces (APIs) that do not handle embedded files.
RESOLUTION
Change file names so that the
LoadPicture function is not called with names that are included in the project. You can do this manually by using different names for your files, or programmatically at run time by using code like the following:
LOCAL lcOldFile, lcNewFile
lcOldFile = "D:\graphics\picture1.bmp"
lcNewFile = JUSTPATH(lcOldFile) + SYS(3) + ".bmp"
RENAME (lcOldFile) TO (lcNewFile)
x = LOADPICTURE(lcNewFile)
RENAME (lcNewFile) TO (lcOldFile)
NOTE: The
JUSTPATH function was introduced in Visual FoxPro 6.0.
STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
REFERENCES
(c) Microsoft Corporation 2000, All Rights Reserved. Contributions by Brian Shreves, Microsoft Corporation.
Keywords: kbbug kbprojmanager kbxbase kbpending KB200294