Clipboard size limit

WindowsClipboard

Windows Problem Overview


Is there any limit of the size of data that can be copied to clipboard? I am using VB6 and need to copy blocks of data to the clipboard.

Windows Solutions


Solution 1 - Windows

Applications call GlobalAlloc(GMEM_MOVEABLE or GMEM_DDESHARE) to allocate the memory for data to be stored on the clipboard and make it available to other applications. For 32-bit applications GlobalAlloc can allocate blocks up to 2 GB in size or up to the amount of virtual memory the PC has, whichever is less. The Windows clipboard does not impose any other size limits.

Solution 2 - Windows

Most data is copied as a reference rather than the data itself so you can copy most anything any size. Text though is actually copied and from what I know the amount of data is limited to how much ram is currently availiable. Remember this, if vb6 can handle it, I'm sure the clipboard can handle it.

Solution 3 - Windows

Depends on the amount of memory in the system.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPradeepView Question on Stackoverflow
Solution 1 - WindowsJan GoyvaertsView Answer on Stackoverflow
Solution 2 - WindowsworkinprogressView Answer on Stackoverflow
Solution 3 - WindowsrahulView Answer on Stackoverflow