OLESTATUS OleClone(lpObject, lpClient, lhClientDoc, lpszObjname, lplpObject)
LPOLEOBJECT lpObject;
LPOLECLIENT lpClient;
LHCLIENTDOC lhClientDoc;
LPCSTR lpszObjname;
LPOLEOBJECT FAR * lplpObject;
The OleClone function makes a copy of an object. The copy is identical to the source object, but it is not connected to the server.
Parameter | Description |
lpObject | Points to the object to copy. |
lpClient | Points to an OLECLIENT structure for the new object. |
lhClientDoc | Identifies the client document in which the object is to be created. |
lpszObjname | Points to a null-terminated string specifying the client's name for the object. This name must be unique with respect to the names of any other objects in the document and cannot contain the forward-slash ("/") character. |
lplpObject | Points to a variable where the DLL will store the long pointer to the new object. |
A client application often use the OleClone function to support the Undo command.
Client applications can supply a new OLECLIENT structure for the cloned object, if required.
The return value is OLE_OK if successful; otherwise, it could be one of the following:
OLE_BUSY
OLE_ERROR_HANDLE
OLE_ERROR_OBJECT
OLE_ERROR_NAME
See AlsoOleEqual