Sr. Content Developer at Microsoft, working remotely in PA, TechBash conference organizer, former Microsoft MVP, Husband, Dad and Geek.
149525 stories
·
33 followers

What is the Windows Clipboard?

1 Share


Unicode Clipboard Img

The Windows clipboard is a built‑in feature that temporarily stores anything you copy—text, images, files. The clipboard is stored in regular RAM, just like any other application data. There is no dedicated hardware region or special memory bank reserved for it. It is wrapped in OS‑level access control and session isolation.

How Windows Protects Clipboard Data

The Windows clipboard uses normal system memory, not a special protected memory region — but Windows does protect access to it. Only processes running in the same user session can access the 
clipboard. A random background service running as SYSTEM cannot read your clipboard unless it explicitly impersonates your user.

Apps must use the official APIs, see below.

Windows enforces:

  • Only one process can open the clipboard at a time.

  • A process must own the clipboard to modify it.

  • Apps cannot read the clipboard without requesting access.

Technical Details

The Windows clipboard was designed as a mechanism that Microsoft Windows operating systems use to allow data to be shared between applications. It first appeared in Windows 3.1, although its functionality has greatly increased since then. 


When you copy something, Windows doesn’t just store the raw bytes. It stores one or more representations of the data, each tagged with a format ID.

A clipboard format tells Windows and applications:

  • what kind of data is stored

  • how to interpret it

  • how to convert it if needed

This is why you can copy text from Word and paste it as plain text, rich text, HTML, or even an image depending on the target app.

Clipboard formats commonly used (CF_TEXT, CF_UNICODETEXT, CF_HDROP, custom formats) are stored as handles to memory blocks.

Microsoft also provides the ability for “private data formats”, custom formats that are application specific (for example, fonts in a word processing program), and that could be registered so that other applications could transfer data in these formats. Two private data formats that are used extensively are object link embedding CF_OLE (0xC013) decimal 49171 and CF_ DataObjects (0xC009) decimal 49161.

For an application to send data to the clipboard, it first allocates a block of global memory using GlobalAlloc, Global- Lock, and GlobalUnlock (Fig. 1). It then opens the clipboard using OpenClipboard, empties it using EmptyClipboard, places the clipboard data using SetClipboard and then closes the clipboard using CloseClipboard (Microsoft.com,). While only one piece of data can be present in the clipboard at any given time, it is possible to send and store that piece of data in multiple formats by performing multiple SetClipboardData functions. 

This allows applications that handle data in different ways to all have access to it (e.g., text in Microsoft Word with or without formatting). Once data is in the clipboard, the block of global memory belongs to the clipboard and other pointers to it become invalid. Getting data from the clipboard (Fig. 2) is even easier and involves opening the clipboard, determining which of the available clipboard formats to retrieve (this is an application specific task), retrieving a handle to the data, and then closing the clipboard.

Live look at list all formats when you copy an item.
InsideClipboard - View the content of all formats stored in the Clipboard (nirsoft.net)

Open Source: https://doxygen.reactos.org/d0/dd2/win32ss_2user_2ntuser_2clipboard_8c.html#afb1abd5c321fb8e6a65f8994dcec07e1

The clipboard formats defined by the system are called standard clipboard formats. These clipboard formats are described in the following table.

Constant/value Description
CF_BITMAP
2
A handle to a bitmap (HBITMAP).
CF_DIB
8
A memory object containing a BITMAPINFO structure followed by the bitmap bits.
CF_DIBV5
17
A memory object containing a BITMAPV5HEADER structure followed by the bitmap color space information and the bitmap bits.
CF_DIF
5
Software Arts' Data Interchange Format.
CF_DSPBITMAP
0x0082
Bitmap display format associated with a private format. The hMem parameter must be a handle to data that can be displayed in bitmap format in lieu of the privately formatted data.
CF_DSPENHMETAFILE
0x008E
Enhanced metafile display format associated with a private format. The hMem parameter must be a handle to data that can be displayed in enhanced metafile format in lieu of the privately formatted data.
CF_DSPMETAFILEPICT
0x0083
Metafile-picture display format associated with a private format. The hMem parameter must be a handle to data that can be displayed in metafile-picture format in lieu of the privately formatted data.
CF_DSPTEXT
0x0081
Text display format associated with a private format. The hMem parameter must be a handle to data that can be displayed in text format in lieu of the privately formatted data.
CF_ENHMETAFILE
14
A handle to an enhanced metafile (HENHMETAFILE).
CF_GDIOBJFIRST
0x0300
Start of a range of integer values for application-defined GDI object clipboard formats. The end of the range is CF_GDIOBJLAST.
Handles associated with clipboard formats in this range are not automatically deleted using the GlobalFree function when the clipboard is emptied. Also, when using values in this range, the hMem parameter is not a handle to a GDI object, but is a handle allocated by the GlobalAlloc function with the GMEM_MOVEABLE flag.
CF_GDIOBJLAST
0x03FF
See CF_GDIOBJFIRST.
CF_HDROP
15
A handle to type HDROP that identifies a list of files. An application can retrieve information about the files by passing the handle to the DragQueryFile function.
CF_LOCALE
16
The data is a handle to the locale identifier associated with text in the clipboard. When you close the clipboard, if it contains CF_TEXT data but no CF_LOCALE data, the system automatically sets the CF_LOCALE format to the current input language. You can use the CF_LOCALE format to associate a different locale with the clipboard text.
An application that pastes text from the clipboard can retrieve this format to determine which character set was used to generate the text.
Note that the clipboard does not support plain text in multiple character sets. To achieve this, use a formatted text data type such as RTF instead.
The system uses the code page associated with CF_LOCALE to implicitly convert from CF_TEXT to CF_UNICODETEXT. Therefore, the correct code page table is used for the conversion.
CF_METAFILEPICT
3
Handle to a metafile picture format as defined by the METAFILEPICT structure. When passing a CF_METAFILEPICT handle by means of DDE, the application responsible for deleting hMem should also free the metafile referred to by the CF_METAFILEPICT handle.
CF_OEMTEXT
7
Text format containing characters in the OEM character set. Each line ends with a carriage return/linefeed (CR-LF) combination. A null character signals the end of the data.
CF_OWNERDISPLAY
0x0080
Owner-display format. The clipboard owner must display and update the clipboard viewer window, and receive the WM_ASKCBFORMATNAME, WM_HSCROLLCLIPBOARD, WM_PAINTCLIPBOARD, WM_SIZECLIPBOARD, and WM_VSCROLLCLIPBOARD messages. The hMem parameter must be NULL.
CF_PALETTE
9
Handle to a color palette. Whenever an application places data in the clipboard that depends on or assumes a color palette, it should place the palette on the clipboard as well.
If the clipboard contains data in the CF_PALETTE (logical color palette) format, the application should use the SelectPalette and RealizePalette functions to realize (compare) any other data in the clipboard against that logical palette.
When displaying clipboard data, the clipboard always uses as its current palette any object on the clipboard that is in the CF_PALETTE format.
CF_PENDATA
10
Data for the pen extensions to the Microsoft Windows for Pen Computing.
CF_PRIVATEFIRST
0x0200
Start of a range of integer values for private clipboard formats. The range ends with CF_PRIVATELAST. Handles associated with private clipboard formats are not freed automatically; the clipboard owner must free such handles, typically in response to the WM_DESTROYCLIPBOARD message.
CF_PRIVATELAST
0x02FF
See CF_PRIVATEFIRST.
CF_RIFF
11
Represents audio data more complex than can be represented in a CF_WAVE standard wave format.
CF_SYLK
4
Microsoft Symbolic Link (SYLK) format.
CF_TEXT
1
Text format. Each line ends with a carriage return/linefeed (CR-LF) combination. A null character signals the end of the data. Use this format for ANSI text.
CF_TIFF
6
Tagged-image file format.
CF_UNICODETEXT
13
Unicode text format. Each line ends with a carriage return/linefeed (CR-LF) combination. A null character signals the end of the data.
CF_WAVE
12
Represents audio data in one of the standard wave formats, such as 11 kHz or 22 kHz PCM.
Read the whole story
alvinashcraft
3 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Will AI Kill Open Source?

1 Share

TL;DR; No - AI won’t kill open source, but it will reshape it. Small, single-purpose packages (micro open source) are likely to languish as AI agents write trivial utility code on the fly. But major frameworks, databases, and runtimes like Django, Postgres, and Python itself aren’t going anywhere - AI agents actually prefer reaching for established building blocks over reinventing them. The key is staying in the architect’s seat.

AI will replace the trivial, leave the foundational, and force us to rethink everything in between:

  • Micro open source (utility packages): Likely to decline – AI writes trivial code faster than importing it
  • Mid-level libraries: Case-by-case – depends on complexity and maintenance burden
  • Major frameworks and infrastructure: Safe – AI agents prefer uv pip install over reinventing Django

I sat down with Paul Everitt to debate this question, and it turns out the answer is way more nuanced than a simple yes or no.

Watch the full conversation on YouTube →

Why would AI rebuild what frameworks already provide?

Paul kicked things off with a great framing. Think of building an app like a 100-meter soccer field. A framework like Flask or Django gets you 95 meters down the field. You and your AI agent only need to handle the last 5 meters – the part that’s unique to your app.

Why would an agent rebuild those 95 meters from scratch when it can just uv pip install the framework and focus on the hard part? Software is a liability, not an asset, and owning all of that code means owning all of those future bugs.

But there’s a counterargument: if you only need 10% of a framework, you’re still dragging in the other 90% – attack surface, security issues, maintenance burden. Maybe you’re better off owning a small thing than renting a large one?

Will AI replace small open source packages?

I think the real casualty here is micro open source – those tiny packages that wrap a single function or a handful of utility classes.

Evidence? Tailwind usage: It’s up 600% in the last 18 months, largely because AI loves reaching for it. But the revenue story for Tailwind is heading in the opposite direction. AI can easily write the 47 utility classes you actually need instead of pulling in the whole framework.

What should go? Micro-packages: There’s the left-pad cautionary tale. A single trivial function as a standalone package took down huge swaths of the JavaScript ecosystem when its maintainer pulled it. AI should absolutely be writing those two functions for us instead of importing a package for them.

Can AI replace major frameworks like Django or Postgres?

Here’s what I don’t see happening: an AI saying “let me rebuild Postgres for you” or “give me an hour, I’ll recreate Django from scratch.” Even if it could, why would it? The agent’s goal is to solve your problem well and quickly. uv pip install django is faster and more reliable than conjuring up a bespoke web framework.

At the macro level, frameworks, databases, runtimes, open source is safe.

Will AI coding costs make open source irrelevant?

Paul raised an important point: what happens when AI pricing subsidies end and costs go up 5x? My take is that hardware costs are dropping even faster.

NVIDIA’s latest inference hardware is roughly 10x cheaper per token than two years ago:

“NVIDIA GB200 NVL72 with extreme hardware and software codesign delivers more than 10x more tokens per watt, resulting in one-tenth the cost per token.”

And the Apple Silicon trajectory means serious local model capability is coming to everyone’s laptop. The bubble isn’t as extreme as people imagine.

How should developers work with AI agents on open source projects?

We also dug into the “just send it” overnight agent workflow – and neither of us is a fan. Working in small, reviewable chunks is the way. Think spec-driven development, not “agents devour this, I’ll see you in the morning.”

Our job was never to type characters. It’s to ship quality software. If you apply engineering discipline – specs, tests, architecture decisions – then AI-assisted code is absolutely something you can put your name on. Paul shared his crisis of confidence the first time he hit Enter on twine upload for an AI-assisted package. I think a lot of developers can relate to that moment. But the question comes down to: did you ship something well-built that serves a purpose? If yes, the tooling you used to get there matters a lot less than you think.

Here’s the workflow that actually works:

  1. Choose your frameworks and specify your stack up front
  2. Work in small, reviewable chunks – not overnight agent runs
  3. Use spec-driven development with tests and architecture decisions
  4. Review all AI-generated output before shipping

Will AI kill open source? The verdict

Micro open source is probably toast. The big building blocks aren’t going anywhere. But the key is to stay in the architect’s seat – choose your frameworks, specify your stack, review the output. Be the architect handing specs to the contractor, and don’t give that role away to the AI.

There’s a lot more in the full conversation including anti-AI vigilante groups shaming people for publishing agent-assisted packages, the open source gift economy, and why none of us really know where this is all heading yet.

Michael Kennedy and Paul Everitt discussing whether AI will kill open source

Watch the full video with Paul Everitt →

Read the whole story
alvinashcraft
3 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Claude now creates interactive charts, diagrams and visualizations

1 Share
Claude now creates interactive charts, diagrams and visualizations
Read the whole story
alvinashcraft
3 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Honda Cancels All Three EVs That It Planned To Build In the US

1 Share
sinij shares a report from Car and Driver: Honda is making a monumental shift in its business plans. The automaker is canceling the development and launch of the 0 Series SUV, the 0 Series saloon, and the Acura RSX, and as a result, expects to take a significant financial hit in 2026 [of up to $15.8 billion]. The automaker was blunt in its announcement of the changing plans, citing American tariff policies and the unpredictable nature surrounding American EV incentives and fossil fuel regulations. In its release marking the announcement, Honda made it clear that it expected to incur further financial losses over the long term if it went through with launching the cars. Honda also called out changing customer values in China, with buyers focusing more on software features and less on things like fuel efficiency and cabin space. In its release regarding the changing product plans, Honda was shockingly blunt about its situation, saying that it was simply unable to deliver products that offer a better value than that of newer Chinese manufacturers.

Read more of this story at Slashdot.

Read the whole story
alvinashcraft
3 hours ago
reply
Pennsylvania, USA
Share this story
Delete

What We Know (and Don't) About M365 E7

1 Share
Beyond the known price tag and release date, there are still a lot of E7 unknowns. Directions' Advisory Services Director Lane Shelton shares his E7 educated guesses and customer advice with Mary Jo Foley.



Download audio: https://www.directionsonmicrosoft.com/wp-content/uploads/2026/03/season5ep5shelton.mp3
Read the whole story
alvinashcraft
3 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Interactive vs non-interactive modes | Copilot CLI for beginners

1 Share
From: GitHub
Duration: 1:54
Views: 9

Want to know the fastest way to prompt GitHub Copilot from your terminal? In this beginner tutorial, we explore the two main modes of the Copilot CLI. Discover how to use the interactive mode to have GitHub Copilot run your project locally or use the non-interactive mode with the -p flag for quick summaries without leaving your shell context.

#GitHubCopilot #CopilotCLI #AI

GitHub Copilot CLI for Beginners: https://github.com/github/copilot-cli-for-beginners?utm_source=youtube-cli-beginners-series-episode2-repo-cta&utm_medium=social&utm_campaign=copilot-cli-ga-phase-two-2026

Stay up-to-date on all things GitHub by connecting with us:

YouTube: https://gh.io/subgithub
Blog: https://github.blog
X: https://twitter.com/github
LinkedIn: https://linkedin.com/company/github
Insider newsletter: https://resources.github.com/newsletter/
Instagram: https://www.instagram.com/github
TikTok: https://www.tiktok.com/@github

About GitHub
It’s where over 180 million developers create, share, and ship the best code possible. It’s a place for anyone, from anywhere, to build anything—it’s where the world builds software. https://github.com

Read the whole story
alvinashcraft
4 hours ago
reply
Pennsylvania, USA
Share this story
Delete
Next Page of Stories