I have a 64 bit VB.NET application and want to allocate a buffer > 2GB in size.
In the following code both the "new" and the "ReDim" throw an "OverflowException."
How can I allocate buffers > 2GB when these functions only accept signed 32 bit values?
(Is this possible in C#?)
Edit - I am running WinXP 64 with 4GB of RAM.
Dim width As Long = 19005 Dim height As Long = 32768 Dim buffer() As Byte = New Byte((width * height * 4) - 1) {} Dim size As Long = (width * height * 4) - 1 ReDim buffer(size)