101 references to UnsafeNativeMethods
System.Drawing (101)
commonui\System\Drawing\Advanced\EncoderParameters.cs (1)
119
Guid guid = (Guid)
UnsafeNativeMethods
.PtrToStructure((IntPtr)( i * size + arrayOffset), typeof(Guid));
commonui\System\Drawing\Advanced\Font.cs (10)
410
IntPtr screenDC =
UnsafeNativeMethods
.GetDC(NativeMethods.NullHandleRef);
415
UnsafeNativeMethods
.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC));
429
IntPtr screenDC =
UnsafeNativeMethods
.GetDC(NativeMethods.NullHandleRef);
435
UnsafeNativeMethods
.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC));
803
IntPtr screenDC =
UnsafeNativeMethods
.GetDC(NativeMethods.NullHandleRef);
815
UnsafeNativeMethods
.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC));
932
IntPtr screenDC =
UnsafeNativeMethods
.GetDC(NativeMethods.NullHandleRef);
940
UnsafeNativeMethods
.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC));
1001
IntPtr screenDC =
UnsafeNativeMethods
.GetDC(NativeMethods.NullHandleRef);
1013
UnsafeNativeMethods
.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC));
commonui\System\Drawing\Advanced\Gdiplus.cs (13)
1621
internal static extern int GdipLoadImageFromStream(
UnsafeNativeMethods
.IStream stream, out IntPtr image);
1629
internal static extern int GdipLoadImageFromStreamICM(
UnsafeNativeMethods
.IStream stream, out IntPtr image);
1655
internal static extern int GdipSaveImageToStream(HandleRef image,
UnsafeNativeMethods
.IStream stream,
1819
internal static extern int GdipCreateBitmapFromStream(
UnsafeNativeMethods
.IStream stream, out IntPtr bitmap);
1827
internal static extern int GdipCreateBitmapFromStreamICM(
UnsafeNativeMethods
.IStream stream, out IntPtr bitmap);
2741
internal static extern int GdipGetMetafileHeaderFromStream(
UnsafeNativeMethods
.IStream stream,
2768
internal static extern int GdipCreateMetafileFromStream(
UnsafeNativeMethods
.IStream stream, out IntPtr metafile);
2829
internal static extern int GdipRecordMetafileStream(
UnsafeNativeMethods
.IStream stream,
2839
internal static extern int GdipRecordMetafileStream(
UnsafeNativeMethods
.IStream stream,
2849
internal static extern int GdipRecordMetafileStreamI(
UnsafeNativeMethods
.IStream stream,
3222
pt = (GPPOINTF)
UnsafeNativeMethods
.PtrToStructure((IntPtr)((long)memory+index*size), pt.GetType());
3244
pt = (GPPOINT)
UnsafeNativeMethods
.PtrToStructure((IntPtr)((long)memory+index*size), pt.GetType());
5004
UnsafeNativeMethods
.IStream pstm,
commonui\System\Drawing\Advanced\GPStream.cs (3)
16
internal class GPStream :
UnsafeNativeMethods
.IStream {
56
public virtual
UnsafeNativeMethods
.IStream Clone() {
71
public virtual long CopyTo(
UnsafeNativeMethods
.IStream pstm, long cb, long[] pcbRead) {
commonui\System\Drawing\Advanced\ImageCodecInfo.cs (1)
271
UnsafeNativeMethods
.PtrToStructure(curcodec, codecp);
commonui\System\Drawing\Advanced\Metafile.cs (6)
836
header.wmf = (MetafileHeaderWmf)
UnsafeNativeMethods
.PtrToStructure(memory, typeof(MetafileHeaderWmf));
841
header.emf = (MetafileHeaderEmf)
UnsafeNativeMethods
.PtrToStructure(memory, typeof(MetafileHeaderEmf));
883
header.wmf = (MetafileHeaderWmf)
UnsafeNativeMethods
.PtrToStructure(memory, typeof(MetafileHeaderWmf));
888
header.emf = (MetafileHeaderEmf)
UnsafeNativeMethods
.PtrToStructure(memory, typeof(MetafileHeaderEmf));
930
header.wmf = (MetafileHeaderWmf)
UnsafeNativeMethods
.PtrToStructure(memory, typeof(MetafileHeaderWmf));
935
header.emf = (MetafileHeaderEmf)
UnsafeNativeMethods
.PtrToStructure(memory, typeof(MetafileHeaderEmf));
commonui\System\Drawing\BufferedGraphicsContext.cs (3)
380
compatDC =
UnsafeNativeMethods
.CreateCompatibleDC(new HandleRef(null, src));
450
int objType =
UnsafeNativeMethods
.GetObjectType(new HandleRef(null, hdc));
536
UnsafeNativeMethods
.DeleteDC(new HandleRef(this, compatDC));
commonui\System\Drawing\Graphics.cs (1)
4623
(((
UnsafeNativeMethods
.GetSystemMetrics(NativeMethods.SM_REMOTESESSION) & 0x00000001) != 0) && (error == 0))) {
commonui\System\Drawing\Icon.cs (8)
619
width =
UnsafeNativeMethods
.GetSystemMetrics(SafeNativeMethods.SM_CXICON);
623
height =
UnsafeNativeMethods
.GetSystemMetrics(SafeNativeMethods.SM_CYICON);
628
IntPtr dc =
UnsafeNativeMethods
.GetDC(NativeMethods.NullHandleRef);
629
bitDepth =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(null, dc), SafeNativeMethods.BITSPIXEL);
630
bitDepth *=
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(null, dc), SafeNativeMethods.PLANES);
631
UnsafeNativeMethods
.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc));
884
picture.SaveAsFile(new
UnsafeNativeMethods
.ComStreamFromDataStream(outputStream), -1, out temp);
916
UnsafeNativeMethods
.CopyMemory(new HandleRef(this, destPtr), new HandleRef(this, srcPtr), Math.Abs(targetData.Stride));
commonui\System\Drawing\Image.cs (2)
717
new
UnsafeNativeMethods
.ComStreamFromDataStream(stream),
1102
guids[i] = (Guid)
UnsafeNativeMethods
.PtrToStructure((IntPtr)((long)buffer + size*i), typeof(Guid));
commonui\System\Drawing\Printing\DefaultPrintController.cs (4)
125
int dpiX =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX);
126
int dpiY =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY);
127
int hardMarginX_DU =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX);
128
int hardMarginY_DU =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY);
commonui\System\Drawing\Printing\PageSettings.cs (20)
113
int dpiX =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX);
114
int hardMarginX_DU =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX);
143
int dpiY =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY);
144
int hardMarginY_DU =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY);
212
SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE)
UnsafeNativeMethods
.PtrToStructure(modePointer, typeof(SafeNativeMethods.DEVMODE));
242
int dpiX =
UnsafeNativeMethods
.GetDeviceCaps(hdc, SafeNativeMethods.LOGPIXELSX);
243
int dpiY =
UnsafeNativeMethods
.GetDeviceCaps(hdc, SafeNativeMethods.LOGPIXELSY);
247
printableArea.X = (float)
UnsafeNativeMethods
.GetDeviceCaps(hdc, SafeNativeMethods.PHYSICALOFFSETX) * 100 / dpiX;
248
printableArea.Y = (float)
UnsafeNativeMethods
.GetDeviceCaps(hdc, SafeNativeMethods.PHYSICALOFFSETY) * 100 / dpiY;
249
printableArea.Width = (float)
UnsafeNativeMethods
.GetDeviceCaps(hdc, SafeNativeMethods.HORZRES) * 100 / dpiX;
250
printableArea.Height = (float)
UnsafeNativeMethods
.GetDeviceCaps(hdc, SafeNativeMethods.VERTRES) * 100 / dpiY;
255
printableArea.Y = (float)
UnsafeNativeMethods
.GetDeviceCaps(hdc, SafeNativeMethods.PHYSICALOFFSETX) * 100 / dpiX;
256
printableArea.X = (float)
UnsafeNativeMethods
.GetDeviceCaps(hdc, SafeNativeMethods.PHYSICALOFFSETY) * 100 / dpiY;
257
printableArea.Height = (float)
UnsafeNativeMethods
.GetDeviceCaps(hdc, SafeNativeMethods.HORZRES) * 100 / dpiX;
258
printableArea.Width = (float)
UnsafeNativeMethods
.GetDeviceCaps(hdc, SafeNativeMethods.VERTRES) * 100 / dpiY;
284
SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE)
UnsafeNativeMethods
.PtrToStructure(modePointer, typeof(SafeNativeMethods.DEVMODE));
339
SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE)
UnsafeNativeMethods
.PtrToStructure(modePointer, typeof(SafeNativeMethods.DEVMODE));
432
SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE)
UnsafeNativeMethods
.PtrToStructure(modePointer, typeof(SafeNativeMethods.DEVMODE));
474
SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE)
UnsafeNativeMethods
.PtrToStructure(modePointer, typeof(SafeNativeMethods.DEVMODE));
558
SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE)
UnsafeNativeMethods
.PtrToStructure(pointer, typeof(SafeNativeMethods.DEVMODE));
commonui\System\Drawing\Printing\PreviewPrintController.cs (4)
134
int dpiX =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX);
135
int dpiY =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY);
136
int hardMarginX_DU =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX);
137
int hardMarginY_DU =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY);
commonui\System\Drawing\Printing\PrinterSettings.cs (4)
967
result =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(dc, dc.Hdc), capability);
1024
SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE)
UnsafeNativeMethods
.PtrToStructure(pointer, typeof(SafeNativeMethods.DEVMODE));
1148
SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE)
UnsafeNativeMethods
.PtrToStructure(modePointer, typeof(SafeNativeMethods.DEVMODE));
1319
SafeNativeMethods.DEVMODE mode = (SafeNativeMethods.DEVMODE)
UnsafeNativeMethods
.PtrToStructure(pointer, typeof(SafeNativeMethods.DEVMODE));
commonui\System\Drawing\Printing\PrintPreviewGraphics.cs (4)
55
int dpiX =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX);
56
int dpiY =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY);
57
int hardMarginX_DU =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX);
58
int hardMarginY_DU =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY);
commonui\System\Drawing\PropertyItemInternal.cs (1)
71
propcopy = (PropertyItemInternal)
UnsafeNativeMethods
.PtrToStructure(propdata,
commonui\System\Drawing\Region.cs (1)
1020
gprectf = (GPRECTF)
UnsafeNativeMethods
.PtrToStructure((IntPtr)(checked((long)memoryRects + rectsize*index)), typeof(GPRECTF));
commonui\System\Drawing\SystemFonts.cs (10)
39
bool result =
UnsafeNativeMethods
.SystemParametersInfo(NativeMethods.SPI_GETNONCLIENTMETRICS, data.cbSize, data, 0);
81
bool result =
UnsafeNativeMethods
.SystemParametersInfo(NativeMethods.SPI_GETNONCLIENTMETRICS, data.cbSize, data, 0);
122
bool result =
UnsafeNativeMethods
.SystemParametersInfo(NativeMethods.SPI_GETNONCLIENTMETRICS, data.cbSize, data, 0);
163
bool result =
UnsafeNativeMethods
.SystemParametersInfo(NativeMethods.SPI_GETNONCLIENTMETRICS, data.cbSize, data, 0);
204
bool result =
UnsafeNativeMethods
.SystemParametersInfo(NativeMethods.SPI_GETNONCLIENTMETRICS, data.cbSize, data, 0);
259
bool result =
UnsafeNativeMethods
.SystemParametersInfo(NativeMethods.SPI_GETICONTITLELOGFONT, Marshal.SizeOf(itfont), itfont, 0);
314
if((
UnsafeNativeMethods
.GetSystemDefaultLCID() & 0x3ff) == 0x0011) {
329
systemDefaultLCIDIsArabic = ((
UnsafeNativeMethods
.GetSystemDefaultLCID() & 0x3ff) == 0x0001);
355
IntPtr handle =
UnsafeNativeMethods
.GetStockObject(NativeMethods.DEFAULT_GUI_FONT);
419
if((
UnsafeNativeMethods
.GetSystemDefaultLCID() & 0x3ff) == 0x0011) {
commonui\System\Drawing\UnsafeNativeMethods.cs (2)
177
UnsafeNativeMethods
.IStream pstm,
217
UnsafeNativeMethods
.IStream Clone();
misc\DpiHelper.cs (3)
108
IntPtr hDC =
UnsafeNativeMethods
.GetDC(NativeMethods.NullHandleRef);
111
deviceDpi =
UnsafeNativeMethods
.GetDeviceCaps(new HandleRef(null, hDC), CAPS.LOGPIXELSX);
113
UnsafeNativeMethods
.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC));