Click here to Skip to main content
15,920,708 members
Home / Discussions / C#
   

C#

 
AnswerRe: I am read File and I want to get information from each 256 byte and from each 256 byte ? Pin
Hari Om Prakash Sharma16-Dec-10 3:19
Hari Om Prakash Sharma16-Dec-10 3:19 
AnswerRe: I am read File and I want to get information from each 256 byte and from each 256 byte ? [modified] Pin
Hari Om Prakash Sharma16-Dec-10 3:36
Hari Om Prakash Sharma16-Dec-10 3:36 
GeneralRe: I am read File and I want to get information from each 256 byte and from each 256 byte ? Pin
Luc Pattyn16-Dec-10 4:17
sitebuilderLuc Pattyn16-Dec-10 4:17 
GeneralRe: I am read File and I want to get information from each 256 byte and from each 256 byte ? Pin
Hari Om Prakash Sharma16-Dec-10 4:29
Hari Om Prakash Sharma16-Dec-10 4:29 
AnswerRe: I am read File and I want to get information from each 256 byte and from each 256 byte ? Pin
Luc Pattyn16-Dec-10 5:13
sitebuilderLuc Pattyn16-Dec-10 5:13 
GeneralRe: I am read File and I want to get information from each 256 byte and from each 256 byte ? Pin
Hari Om Prakash Sharma16-Dec-10 5:16
Hari Om Prakash Sharma16-Dec-10 5:16 
GeneralRe: I am read File and I want to get information from each 256 byte and from each 256 byte ? Pin
Vern Ma16-Dec-10 16:12
Vern Ma16-Dec-10 16:12 
QuestionCrystal Reports Page Header Problem Pin
Muneeb Abdul Shakoor16-Dec-10 2:42
Muneeb Abdul Shakoor16-Dec-10 2:42 
AnswerRe: Crystal Reports Page Header Problem Pin
FunkySteve16-Dec-10 2:49
FunkySteve16-Dec-10 2:49 
GeneralRe: Crystal Reports Page Header Problem Pin
Muneeb Abdul Shakoor16-Dec-10 3:03
Muneeb Abdul Shakoor16-Dec-10 3:03 
QuestionWeb browser in asp.net Pin
abbd16-Dec-10 0:07
abbd16-Dec-10 0:07 
AnswerRe: Web browser in asp.net Pin
Hiren solanki16-Dec-10 0:35
Hiren solanki16-Dec-10 0:35 
AnswerRe: Web browser in asp.net Pin
RaviRanjanKr16-Dec-10 1:46
professionalRaviRanjanKr16-Dec-10 1:46 
AnswerRe: Web browser in asp.net Pin
Not Active16-Dec-10 2:19
mentorNot Active16-Dec-10 2:19 
Questionsolution for reading Belgian eID's Pin
Eli Nurman15-Dec-10 23:53
Eli Nurman15-Dec-10 23:53 
AnswerRe: solution for reading Belgian eID's Pin
OriginalGriff16-Dec-10 0:49
mveOriginalGriff16-Dec-10 0:49 
GeneralRe: solution for reading Belgian eID's Pin
Eli Nurman16-Dec-10 1:03
Eli Nurman16-Dec-10 1:03 
QuestionCreating Bitmap with external pixel data in byte[] array GC problem Pin
Chesnokov Yuriy15-Dec-10 21:01
professionalChesnokov Yuriy15-Dec-10 21:01 
I allocate and fill byte[] array with some pixels and then create Bitmap object with it Bitmap(Int32, Int32, Int32, PixelFormat, IntPtr).

How to guarantee that allocated byte[] array will not be garbage collected?

In extreme conditions with application consuming all its available memory the allocated image becomes invalid with the only reason that byte[] array got collected as exception is 0xc0000005. When I try to copy some portion of that image with Graphics.DrawImage() to another one the AccessVialation exception happen in gdiplus assembly. The exception that even can not be catched.

Module name: gdiplus.dll, version: 6.1.7600.16385
Exception code: 0xc0000005
Application path: C:\soft\MyApplication.exe
Module path: C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7600.16385_none_72fc7cbf861225ca\gdiplus.dll


Application: MyApplication.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
   at System.Drawing.SafeNativeMethods+Gdip.GdipDrawImagePointRectI(System.Runtime.InteropServices.HandleRef, System.Runtime.InteropServices.HandleRef, Int32, Int32, Int32, Int32, Int32, Int32, Int32)
   at System.Drawing.Graphics.DrawImage(System.Drawing.Image, Int32, Int32, System.Drawing.Rectangle, System.Drawing.GraphicsUnit)
   at ...

Чесноков

AnswerRe: Creating Bitmap with external pixel data in byte[] array GC problem Pin
OriginalGriff15-Dec-10 21:38
mveOriginalGriff15-Dec-10 21:38 
GeneralRe: Creating Bitmap with external pixel data in byte[] array GC problem Pin
Chesnokov Yuriy15-Dec-10 21:45
professionalChesnokov Yuriy15-Dec-10 21:45 
AnswerRe: Creating Bitmap with external pixel data in byte[] array GC problem Pin
Luc Pattyn16-Dec-10 0:32
sitebuilderLuc Pattyn16-Dec-10 0:32 
AnswerRe: Creating Bitmap with external pixel data in byte[] array GC problem Pin
_Erik_16-Dec-10 4:55
_Erik_16-Dec-10 4:55 
GeneralRe: Creating Bitmap with external pixel data in byte[] array GC problem Pin
Chesnokov Yuriy16-Dec-10 8:21
professionalChesnokov Yuriy16-Dec-10 8:21 
GeneralRe: Creating Bitmap with external pixel data in byte[] array GC problem Pin
harold aptroot16-Dec-10 8:49
harold aptroot16-Dec-10 8:49 
GeneralRe: Creating Bitmap with external pixel data in byte[] array GC problem Pin
_Erik_16-Dec-10 10:25
_Erik_16-Dec-10 10:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.