windows 剪贴板大小限制

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1321866/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 06:40:45  来源:igfitidea点击:

Clipboard size limit

windowsclipboard

提问by

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.

可以复制到剪贴板的数据大小是否有限制?我正在使用 VB6,需要将数据块复制到剪贴板。

回答by Jan Goyvaerts

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 GlobalAlloccan 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.

应用程序调用GlobalAlloc(GMEM_MOVEABLE or GMEM_DDESHARE)为要存储在剪贴板上的数据分配内存,并使其可供其他应用程序使用。对于 32 位应用程序,GlobalAlloc最多可以分配大小为 2 GB 的块或最多为 PC 拥有的虚拟内存量,以较小者为准。Windows 剪贴板不强加任何其他大小限制。

回答by Jan Goyvaerts

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.

大多数数据被复制为参考而不是数据本身,因此您可以复制任何大小的大部分内容。虽然文本实际上是复制的,但据我所知,数据量仅限于当前可用的内存量。记住这一点,如果 vb6 可以处理它,我相信剪贴板可以处理它。

回答by rahul

Depends on the amount of memory in the system.

取决于系统中的内存量。