Click here to Skip to main content
15,890,579 members
Home / Discussions / C#
   

C#

 
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 
QuestionSetting Crystal Report printer option to a Network printer Pin
HatakeKaKaShi15-Dec-10 15:12
HatakeKaKaShi15-Dec-10 15:12 
AnswerRe: Setting Crystal Report printer option to a Network printer Pin
thatraja15-Dec-10 20:16
professionalthatraja15-Dec-10 20:16 
QuestionDefault or optional Parameters in C# Pin
indian14315-Dec-10 6:38
indian14315-Dec-10 6:38 
AnswerRe: Default or optional Parameters in C# Pin
Rob Philpott15-Dec-10 6:40
Rob Philpott15-Dec-10 6:40 
GeneralRe: Default or optional Parameters in C# Pin
PIEBALDconsult15-Dec-10 7:19
mvePIEBALDconsult15-Dec-10 7:19 
AnswerRe: Default or optional Parameters in C# Pin
Luc Pattyn15-Dec-10 7:17
sitebuilderLuc Pattyn15-Dec-10 7:17 
GeneralRe: Default or optional Parameters in C# Pin
indian14315-Dec-10 11:40
indian14315-Dec-10 11:40 
AnswerRe: Default or optional Parameters in C# Pin
Abhinav S15-Dec-10 17:27
Abhinav S15-Dec-10 17:27 
GeneralRe: Default or optional Parameters in C# Pin
PIEBALDconsult16-Dec-10 2:10
mvePIEBALDconsult16-Dec-10 2:10 
GeneralRe: Default or optional Parameters in C# Pin
Fabio Franco16-Dec-10 9:38
professionalFabio Franco16-Dec-10 9:38 

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.