From cbbd53eda55fbdf65f22b5f57c7dbc4b1ea594fd Mon Sep 17 00:00:00 2001
From: alexke-dev <65682333+alexke-dev@users.noreply.github.com>
Date: Thu, 10 Aug 2023 16:28:02 -0700
Subject: Remove Print Driver Samples (#1017)
* Remove print driver samples. Add README.md to redirect consumers to Print Support App (PSA) development guide.
* Remove en-us from URL.
---
.../ExtensionSample/WindowHelper.cs | 83 ----------------------
1 file changed, 83 deletions(-)
delete mode 100644 print/v4PrintDriverSamples/PrinterExtensionSample/ExtensionSample/WindowHelper.cs
(limited to 'print/v4PrintDriverSamples/PrinterExtensionSample/ExtensionSample/WindowHelper.cs')
diff --git a/print/v4PrintDriverSamples/PrinterExtensionSample/ExtensionSample/WindowHelper.cs b/print/v4PrintDriverSamples/PrinterExtensionSample/ExtensionSample/WindowHelper.cs
deleted file mode 100644
index fe830921..00000000
--- a/print/v4PrintDriverSamples/PrinterExtensionSample/ExtensionSample/WindowHelper.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
-// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
-// PARTICULAR PURPOSE.
-//
-// Copyright (c) Microsoft Corporation. All rights reserved
-//
-//
-// Abstract:
-//
-// This file contains helper methods that provide a friendly way to access win32 window functions.
-
-using System;
-using System.Runtime.InteropServices;
-
-namespace Microsoft.Samples.Printing.PrinterExtension.Helpers
-{
- class WindowHelper
- {
- ///
- /// P/Invoke signature for Win32 function "SetForegroundWindow".
- ///
- /// Handle to window
- [return: MarshalAs(UnmanagedType.Bool)]
- [DllImport("User32", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)]
- public static extern bool SetForegroundWindow(IntPtr hwnd);
-
- ///
- /// Wrapper for Win32 function "FlashWindowEx"
- ///
- /// Handle of the window to flash
- public static bool FlashWindow(IntPtr hWnd)
- {
- FLASHWINFO fInfo = new FLASHWINFO();
-
- fInfo.cbSize = Convert.ToUInt32(Marshal.SizeOf(fInfo));
- fInfo.hwnd = hWnd; // Handle to window
- fInfo.uCount = UInt32.MaxValue; // Number of times to flash
- fInfo.dwTimeout = 0; // Use default cursor blink rate
- // Flash both window caption and taskbar button, until the window is brought to the foreground.
- fInfo.dwFlags = (uint)(FLASHW.ALL | FLASHW.TIMERNOFG);
-
- return FlashWindowEx(ref fInfo);
- }
-
- #region private members
-
- ///
- /// P/Invoke signature for Win32 function "FlashWindowEx".
- ///
- [return: MarshalAs(UnmanagedType.Bool)]
- [DllImport("User32", CharSet = CharSet.Auto, SetLastError = false, ExactSpelling = true)]
- private static extern bool FlashWindowEx(ref FLASHWINFO pwfi);
-
- [StructLayout(LayoutKind.Sequential)]
- private struct FLASHWINFO
- {
- public UInt32 cbSize;
- public IntPtr hwnd;
- public UInt32 dwFlags;
- public UInt32 uCount;
- public UInt32 dwTimeout;
- }
-
- ///
- /// Represents the FLASH_Xxx flags
- ///
- [Flags]
- private enum FLASHW : uint
- {
- ///
- /// Flash both the window caption and taskbar button
- ///
- ALL = 3,
- ///
- /// Flash continuously until the window comes to the foreground.
- ///
- TIMERNOFG = 12
- }
-
- #endregion
- }
-}
--
cgit v1.3.1