This example empties the clipboard (opened by WinOpenClipbrd), removing and freeing all handles to data in the clipboard.
#define INCL_WINCLIPBOARD /* Window Clipboard Functions */ #include <os2.h> BOOL fSuccess; /* success indicator */ HAB hab; /* anchor-block handle */ fSuccess = WinOpenClipbrd(hab); if (fSuccess) fSuccess = WinEmptyClipbrd(hab);