[Mono-devel-list] making libgdiplus and System.Drawing 64 bit clean
Peter Dennis Bartok
peter at novonyx.com
Tue Dec 28 05:56:27 EST 2004
Zoltan,
Thanks for all the work you put into this.
MS defines a HDC as via their DECLARE_HANDLE as an int, which is why I think
the GdipGetDC/GdipReleaseDC functions treat it as an int pointer.
Technically, the hDC in those functions is supposed to be equivalent to the
GpGraphics pointer (ie the GdipGetDC/GdipReleaseDC functions are supposed to
be valid 32bit code)
The other functions GdipCreateFromHDC and GdipCreateFromHWND contain
obsolete code, however the HDC still should be equivalent to a GpGraphics
pointer in CreateFromHDC, the CreateFromHWND warnings should go away once
the obsolete code is removed.
Out of curiosity, does the new IntPtr(xxx.ToInt64..) carry a big performance
impact?
Cheers,
Peter
-----Original Message-----
From: "Zoltan Varga" <vargaz at gmail.com>
To: "Mono devel list" <mono-devel-list at lists.ximian.com>
Date: 28 December, 2004 02:49
Subject: [Mono-devel-list] making libgdiplus and System.Drawing 64 bit clean
> Hi,
>
> The attached patch attempts to fix 64 bit issues in libgdiplus and
>Sys.Drawing.
>In addition to this patch, there are some warnings in graphics.c
>because sometimes hDC is treated as an int and sometimes as a pointer.
>I don't know which
>one is correct, so the patch doesn't touch these.
>
>graphics.c: In function `GdipCreateFromHDC':
>graphics.c:294: warning: cast to pointer from integer of different size
>graphics.c: In function `GdipCreateFromHWND':
>graphics.c:320: warning: cast from pointer to integer of different size
>graphics.c:329: warning: cast from pointer to integer of different size
>graphics.c: In function `GdipGetDC':
>graphics.c:398: warning: cast from pointer to integer of different size
>graphics.c: In function `GdipReleaseDC':
>graphics.c:406: warning: cast from pointer to integer of different size
>
More information about the Mono-devel-list
mailing list