9.5.3 OleCopyToClipboard

OLESTATUS OleCopyToClipboard(lpObject)

LPOLEOBJECT lpObject;

The OleCopyToClipboard function puts the specified object on the clipboard.

Parameter Description

lpObject Points to the object to copy to the clipboard.

A client application typically calls the OleCopyToClipboard function when a user chooses the Copy or Cut command from the Edit menu.

The client application should open and empty the clipboard, call the OleCopyToClipboard function, and close the clipboard.

The return value is OLE_OK if successful; otherwise, it could be OLE_ERROR_OBJECT.