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