FIX: EXE Crashes When For...Each Loop Iterates Through Array Returned by Property Get Procedure (223113)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q223113 SYMPTOMS
When using a For...Each loop to iterate through an array that was returned from a Property Get procedure, you receive the following error message:
The instruction at "0x6610d3b1" referenced memory at "0x00131004". The memory could not be "read".
NOTE: The error occurs when the code is called from an EXE that was compiled to native code, but does not occur when called from an EXE that was compiled to p-code. The error does not occur when you execute the code in the Visual Basic IDE.
RESOLUTION
You can work around the problem using one of the following alternative methods:
- Compile the EXE to p-code.
- Copy the result of the Property Get procedure to a dynamic array, and then use the dynamic array in the For...Each loop.
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 Visual Studio 6.0 Service Pack 3.
For more information about Visual Studio 6.0 Service Packs, please see the following articles in the Microsoft Knowledge Base: 194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why 194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
Modification Type: | Major | Last Reviewed: | 5/13/2003 |
---|
Keywords: | kbBug kbCompiler kbfix kbVS600sp3fix KB223113 |
---|
|