11 [DllImport(
"User32.dll", SetLastError =
true)]
15 [DllImport(
"user32.dll", SetLastError =
true)]
18 [DllImport(
"user32.dll", SetLastError =
true)]
21 [DllImport(
"user32.dll")]
24 [DllImport(
"user32.dll", SetLastError =
true)]
27 [DllImport(
"Kernel32.dll", SetLastError =
true)]
30 [DllImport(
"Kernel32.dll", SetLastError =
true)]
34 [DllImport(
"Kernel32.dll", SetLastError =
true)]
72 byte[] buff =
new byte[size];
75 return !
string.IsNullOrEmpty(
text);
static bool SetClipboardData(uint uFormat, IntPtr data)
static bool OpenClipboard(IntPtr hWndNewOwner)
static bool TryGetText(out string text)
static bool IsClipboardFormatAvailable(uint format)
static bool CloseClipboard()
static IntPtr GetClipboardData(uint uFormat)
const uint CF_UNICODETEXT
static IntPtr GlobalLock(IntPtr hMem)
static bool GlobalUnlock(IntPtr hMem)
static int GlobalSize(IntPtr hMem)
static void SetText(string text)
static void Copy(int[] source, int startIndex, IntPtr destination, int length)
static unsafe IntPtr StringToHGlobalUni(string? s)
static readonly IntPtr Zero