WinOpenClipbrd
Appearance
This function opens the clipboard.
Syntax
WinOpenClipbrd(hab)
Parameters
- hab (HAB) - input
- Anchor-block handle.
- rc (BOOL) - returns
- Success indicator.
- TRUE - Clipboard successfully opened
- FALSE - Error occurred.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE - Clipboard successfully opened
- FALSE - Error occurred.
Remarks
The process reading the clipboard does not become the owner of the object in it; it must not update or free the object.
This function prevents other threads and processes from examining or changing the clipboard contents.
If another thread or process already has the clipboard open, this function does not return until the clipboard is closed.
Messages can be received from other threads and processes during the processing of this function.
Example Code
This example opens the clipboard for use by the current process.
#define INCL_WINCLIPBOARD /* Window Clipboard Functions */ #include <os2.h> BOOL fSuccess; /* success indicator */ HAB hab; /* anchor-block handle */ fSuccess = WinOpenClipbrd(hab);