Select the product you need help with
- Internet Explorer
- Windows Phone
- More products
FIX: OutOfMemoryException Occurs When You Access Non-Fixed Size Safe Arrays in a User-Defined Type
Article ID: 327107 - View products that this article applies to.
This article was previously published under Q327107
The following error message occurs when you invoke a method on a Component Object Model (COM) object that returns a user-defined type that contains a Safe array (non-fixed size):
An unhandled exception of type 'System.OutOfMemoryException' occurred in ApplicationName.exe
Additional information: Not enough storage is available to complete this operation.
This behavior occurs because the .NET Framework cannot marshal a structure field with a Safe array (non-fixed size) type.
Steps to Reproduce the Behavior
For more information about interop marshaling, visit the following Microsoft Web site: