OleCopyToClipboard

3.1

  #include <ole.h>    

  OLESTATUS OleCopyToClipboard(lpObject)    
  LPOLEOBJECT lpObject; /* address of 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 may 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 and empty the clipboard, call the OleCopyToClipboard function, and close the clipboard.