public static DeviceContext CreateDC(string driverName, string deviceName, string fileName, HandleRef devMode) { return(new DeviceContext(IntUnsafeNativeMethods.CreateDC(driverName, deviceName, fileName, devMode), System.Windows.Forms.Internal.DeviceContextType.NamedDevice)); }