FIX: Multiple References to File Object of Project Causes OLE Error (258530)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q258530 SYMPTOMS
When obtaining multiple references to an object in the Project.Files collection, you may receive the error message:
OLE Exception error: Exception code c0000005. OLE object may be corrupt. RESOLUTION
A workaround in builds of Visual FoxPro 6.0 prior to Visual Studio Service Pack 4 is to refer to the objects in the Files collection by number instead of name. The following code does not produce the exception error in Visual Studio Service Pack 3 and earlier:
*Start of Code
MODIFY PROJECT proj1 NOWAIT NOSHOW
loFile = Application.ActiveProject.Files(1)
? VARTYPE(loFile) && Should be "O" for object
RELEASE loFile
loFile = Application.ActiveProject.Files(1)
*End of Code
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in the latest service pack for Visual Studio 6.0. For additional information about Visual Studio service packs, click the following article numbers to view the articles in the Microsoft Knowledge Base: 194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why
194295 HOWTO: Tell That a Visual Studio Service Pack Is Installed To download the latest Visual Studio service pack, visit the following Microsoft Web site:
Modification Type: | Minor | Last Reviewed: | 12/12/2005 |
---|
Keywords: | kbBug kbCodeSnippet kbfix kbProjManager kbVS600sp4fix kbVS600sp5fix KB258530 kbAudDeveloper |
---|
|