OleObjectConvert

3.1

  #include <ole.h>    

  OLESTATUS OleObjectConvert(lpObject, lpszProtocol, lpClient, lhClientDoc, lpszObjname, lplpObject)    
  LPOLEOBJECT lpObject; /* address of object to convert */
  LPCSTR lpszProtocol; /* address of string for protocol name */
  LPOLECLIENT lpClient; /* address of client for new object */
  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 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.

Parameters

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 a slash mark (/).

lplpObject

Points to a variable in which the library stores a pointer to the new object.

Return Value

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_STATIC

Comments

The only conversion currently supported is that of changing a linked or embedded object to a static object.

See Also

OleClone