using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; namespace CyworldDownloader { class GDI32 { public enum TernaryRasterOperations { SRCCOPY = 0xCC0020 } [System.Runtime.InteropServices.DllImportAttribute("gdi32.dll")] public static extern int BitBlt( IntPtr hdcDest, // handle to destination DC (device context) int nXDest, // x-coord of destination upper-left corner int nYDest, // y-coord of destination upper-left corner int nWidth, // width of destination rectangle int nHeight, // height of destination rectangle IntPtr hdcSrc, // handle to source DC int nXSrc, // x-coordinate of source upper-left corner int nYSrc, // y-coordinate of source upper-left corner int dwRop // raster operation code ); [System.Runtime.InteropServices.DllImportAttribute("gdi32.dll")] public static extern IntPtr CreateCompatibleDC(IntPtr hdc); [System.Runtime.InteropServices.DllImportAttribute("gdi32.dll")] public static extern IntPtr SelectObject(IntPtr hdc, IntPtr obj); [System.Runtime.InteropServices.DllImportAttribute("gdi32.dll")] public static extern void DeleteObject(IntPtr obj); [DllImport("gdi32.dll", EntryPoint="DeleteDC")] public static extern bool DeleteDC([In] IntPtr hdc); [DllImport("gdi32.dll", EntryPoint="CreateCompatibleBitmap")] public static extern IntPtr CreateCompatibleBitmap([In] IntPtr hdc, int nWidth, int nHeight); } }