[DllImport("gdi32.dll", ExactSpelling = true)]
private static extern int GetDeviceCaps(IntPtr hDC, int nIndex);
[DllImport("gdi32.dll", CharSet = CharSet.Auto)]
private static extern IntPtr CreateDC(string szdriver, string szdevice, string szoutput, IntPtr devmode);
[DllImport("gdi32.dll", ExactSpelling = true)]
private static extern bool DeleteDC(IntPtr hdc);
private static extern int GetDeviceCaps(IntPtr hDC, int nIndex);
[DllImport("gdi32.dll", CharSet = CharSet.Auto)]
private static extern IntPtr CreateDC(string szdriver, string szdevice, string szoutput, IntPtr devmode);
[DllImport("gdi32.dll", ExactSpelling = true)]
private static extern bool DeleteDC(IntPtr hdc);