LoadCB v0.1
SaveCB v0.1
ListCB v0.1
LsCBView v0.1

This is a small collection of low level clipboard tools for programmers and other code tinkerers.


ListCB
Lists all clipboard formats and if possible the originating process ID and program filename.
No arguments required.

LoadCB
This will put data from a file onto the clipboard with the specified format WITHOUT CALLING EmptyClipboard().

SaveCB
Does the opposite of LoadCB.

LsCBView
Exposes automatic reads from the clipboard.
This makes use of "Delayed Rendering" feature (which exists since Win1.x) to catch any applications that automatically reads data from the clipboard.
However, the format must be specified and the current Clipboard WILL BE CLEARED OUT FIRST!
This works by creating a invisible trap window that calls EmptyClipboard() to become the owner and SetClipboardData() with a NULL handle.
Any program that uses SetClipboardViewer() or polls GetClipboardSequenceNumber() and reacts to the used Clipboard format will be caught and listed.
The window will close itself after a 1sec timeout if it doesn't receive WM_RENDERFORMAT messages anymore.


Usage:
APPNAME REG "Registered Formatname" [file.bin]
- This gets format number via RegisterClipboardFormat()
- The name is case insensitive.

APPNAME HEX HexNumber [file.bin]
- HexNumber is passed to strtol(), so the 0x prefix will be accepted.

APPNAME CF_STANDARDFORMAT [file.bin]
- All known Standard Clipboard Formats (starting with CF_ ) will work except for special ones that doesn't pass data via HGLOBAL handle.
- The name is case insensitive.


Last notes about listing the process names: (applies to ListCB and LsCBView) 
Toolhelp32 functions are used under Win9x. 
Also Win98 KernelEx will be detected and it's PSAPI functions will be ignored as it very likely outputs the wrong module. (some DLL instead of EXE)
PSAPI will be used on all WinNT systems, however PSAPI.DLL is not included by default on NT4 and earlier.
The DLL from the WinNT3.51 SDK will work fine on NT3.51 and NT4.
However it will not really work on NT3.50 as IMAGEHLP.DLL lacks some functions, 
but if you grab that DLL from a NT3.51 installation and put in the same directory as the program then it will work fine. (Overwriting the one in system32 is NOT a good idea)
Lastly both programs will tell you what API is used (TLH32=Toolhelp32) and if the KernelEx workaround is employed.


You can get WinNT3.51 PSAPI.DLL and IMAGEHLP.DLL from my website:
http://qwertz.w10.site/public/psapi351.zip


T. Sosnow. <t-sosnow@posteo.com>
Visit QWERTZ-tek at http://qwertz.w10.site/ for my other stuff
November 7, 2026
