R
Rick
I'm trying to extract an icon from a resource in a dll. The following
sequence:
Dim MyAssemblies() As [Assembly]
..
..
ResourceNames = MyAssemblies(i).GetManifestResourceNames
IconStream = _
MyAssemblies(i).GetManifestResourceStream(ResourceNames(0))
Dim Icon As New Bitmap(IconStream)
Results in an exception:
System.OutOfMemoryException was unhandled
Message="OutOfMemoryException"
StackTrace:
at Microsoft.AGL.Common.MISC.HandleAr()
at System.Drawing.Bitmap._InitFromMemoryStream()
at System.Drawing.Bitmap..ctor()
at ...(Application stack trace)
There is plenty of both storage and program memory left on the device,
and the stream (IconStream) is small (length = 1078). Any ideas? Should
I just punt and put the icon in a file? (not as general)
sequence:
Dim MyAssemblies() As [Assembly]
..
..
ResourceNames = MyAssemblies(i).GetManifestResourceNames
IconStream = _
MyAssemblies(i).GetManifestResourceStream(ResourceNames(0))
Dim Icon As New Bitmap(IconStream)
Results in an exception:
System.OutOfMemoryException was unhandled
Message="OutOfMemoryException"
StackTrace:
at Microsoft.AGL.Common.MISC.HandleAr()
at System.Drawing.Bitmap._InitFromMemoryStream()
at System.Drawing.Bitmap..ctor()
at ...(Application stack trace)
There is plenty of both storage and program memory left on the device,
and the stream (IconStream) is small (length = 1078). Any ideas? Should
I just punt and put the icon in a file? (not as general)