Click here to Skip to main content
15,881,882 members

Comments by Roger500 (Top 3 by date)

Roger500 16-Jul-21 0:05am View    
Check the app.Config for
<runtime>
<gcallowverylargeobjects enabled="true">

On 64-bit platforms, it enables arrays that are greater than 2 gigabytes (GB) in total size.
reference https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/runtime/gcallowverylargeobjects-element
Roger500 13-Oct-12 9:43am View    
After doing some digging I figured out how to implement your solution. It works GREAT!
catch (IOException ex)
{ int hresult = System.Runtime.InteropServices.Marshal.GetHRForException(ex);
...
}

Many thanks!
Roger500 20-Sep-12 4:01am View    
In this case, the default parameter solution worked well. The integer being passed had a range of -1 to 100. I simply pass a -2 and the receiving routine ignores the integer parameter. Simple but effective. Thanks.