Beispiel #1
0
 /// <summary>
 /// Factory method
 /// </summary>
 /// <param name="hWnd">IntPtr, optional, with the hWnd for the clipboard lock</param>
 /// <returns>ClipboardUpdateInformation</returns>
 public static ClipboardUpdateInformation Create(IntPtr hWnd = default)
 {
     if (hWnd == IntPtr.Zero)
     {
         hWnd = WinProcHandler.Instance.Handle;
     }
     using (var clipboard = ClipboardNative.Access(hWnd))
     {
         return(new ClipboardUpdateInformation(clipboard));
     }
 }
Beispiel #2
0
        /// <summary>
        /// Factory method
        /// </summary>
        /// <param name="hWnd">IntPtr, optional, with the hWnd for the clipboard lock</param>
        /// <returns>ClipboardUpdateInformation</returns>
        public static ClipboardUpdateInformation Create(IntPtr hWnd = default)
        {
#if !NETSTANDARD2_0
            if (hWnd == IntPtr.Zero)
            {
                hWnd = WinProcHandler.Instance.Handle;
            }
#endif
            using var clipboard = ClipboardNative.Access(hWnd);
            return(new ClipboardUpdateInformation(clipboard));
        }
 /// <summary>
 /// Factory method
 /// </summary>
 /// <param name="hWnd">IntPtr, optional, with the hWnd for the clipboard lock</param>
 /// <returns>ClipboardUpdateInformation</returns>
 public static ClipboardUpdateInformation Create(IntPtr hWnd = default(IntPtr))
 {
     if (hWnd == IntPtr.Zero)
     {
         hWnd = WinProcHandler.Instance.Handle;
     }
     using (ClipboardNative.Lock(hWnd))
     {
         return(new ClipboardUpdateInformation());
     }
 }