#include <ole.h> |
OLESTATUS OleCopyFromLink(lpObject, lpszProtocol, lpClient, lhClientDoc, lpszObjname, lplpObject) | |||||
LPOLEOBJECT lpObject; | /* address of object to embed | */ | |||
LPCSTR lpszProtocol; | /* address of protocol name | */ | |||
LPOLECLIENT lpClient; | /* address of client structure | */ | |||
LHCLIENTDOC lhClientDoc; | /* long handle of client document | */ | |||
LPCSTR lpszObjname; | /* address of string for object name | */ | |||
LPOLEOBJECT FAR* lplpObject; | /* address of pointer to new object | */ |
The OleCopyFromLink function makes an embedded copy of a linked object.
lpObject
Points to the linked object that is to be embedded.
lpszProtocol
Points to a null-terminated string specifying the name of the protocol required for the new embedded object. Currently, this value can be StdFileEditing (the name of the object linking and embedding protocol).
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.
lplpObject
Points to a variable where the long pointer to the new object will be stored.
The return value is OLE_OK if the function is successful. Otherwise, it is an error value, which may be one of the following:
OLE_BUSY
OLE_ERROR_HANDLE
OLE_ERROR_NAME
OLE_ERROR_OBJECT
OLE_ERROR_PROTOCOL
OLE_WAIT_FOR_RELEASE
Making an embedded copy of a linked object may involve starting the server application.