NAME OpenClipboard -- create a handle on a clipboard unit. (V36) SYNOPSIS ch = OpenClipboard(unitNumber) D0 D0 struct ClipboardHandle *OpenClipboard(LONG); FUNCTION Opens the clipboard.device and opens a stream for the specified unit (usually PRIMARY_CLIP). This handle structure will be used as the clipboard stream for IFFHandles initialized as clipboard streams by InitIFFasClip(). INPUTS unitNumber - clipboard unit number (usually PRIMARY_CLIP). RESULT ch - pointer to ClipboardHandle structure or NULL if unsuccessful. BUGS This function had several bugs prior to V39. First bug was that if the clipboard.device couldn't open, two calls to FreeSignal() were made with uninitialized values as parameters. The result of this was a corrupt signal mask in the Task field. Second bug was that OpenDevice() was called with an IO request that didn't have a valid MsgPort pointer in it. Third bug was that the two message ports allocated by the function (ClipboardHandle->cbh_CBport and ClipboardHandle->cbh_SatisfyPort) were not being initialized correctly and would cause a system crash if a message ever got to either of them. SEE ALSO InitIFFasClip(), CloseClipboard(), <libraries/iffparse.h>