OleCopyToClipboard

  OLESTATUS OleCopyToClipboard(lpObject)    
  LPOLEOBJECT lpObject; /* pointer to object */

The OleCopyToClipboard function puts the specified object on the clipboard.

Parameters

lpObject

Points to the object to copy to the clipboard.

Return Value

The return value is OLE_OK if the function is successful. Otherwise, it is an error value, which can be OLE_ERROR_OBJECT.

Comments

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 the clipboard, list the appropriate data formats on the clipboard, call the OleCopyToClipboard function, give any additional presentation formats, and close the clipboard.