OLESTATUS OleObjectConvert(lpObject, lpszProtocol, lpClient, lhClientDoc,
lpszObjname, lplpObject)
LPOLEOBJECT lpObject;
LPCSTR lpszProtocol;
LPOLECLIENT lpClient;
LHCLIENTDOC lhClientDoc;
LPCSTR lpszObjname;
LPOLEOBJECT FAR * lplpObject;
The OleObjectConvert function creates a new object that supports a specified protocol by converting an existing object. This function neither deletes nor replaces the original object.
Parameter | Description |
lpObject | Points to the object to convert. |
lpszProtocol | Points to a null-terminated string specifying the name of the required protocol. Currently this value can be "Static" (for uneditable pictures only). |
lpClient | Points to an OLECLIENT structure for the new object. |
lhClientDoc | Identifies the client document in which the object is being 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 in which the client DLL stores a pointer to the new object. |
The only conversion currently supported is changing linked or embedded objects to static objects.
The return value is OLE_OK if successful; otherwise, it could be one of the following:
OLE_BUSY
OLE_ERROR_HANDLE
OLE_ERROR_MEMORY
OLE_ERROR_NAME
OLE_ERROR_OBJECT
OLE_ERROR_PROTOCOL
OLE_ERROR_STATIC
See AlsoOleClone