Edit

Share via


ole2.h header

This header is used by multiple technologies. For more information, see:

ole2.h contains the following programming interfaces:

Functions

 
CreateDataAdviseHolder

The CreateDataAdviseHolder function (ole2.h) retrieves a pointer to the OLE implementation of IDataAdviseHolder on the data advise holder object.
CreateOleAdviseHolder

Creates an advise holder object for managing compound document notifications. It returns a pointer to the object's OLE implementation of the IOleAdviseHolder interface.
DoDragDrop

Carries out an OLE drag and drop operation.
IsAccelerator

Determines whether the specified keystroke maps to an accelerator in the specified accelerator table.
OleBuildVersion

This function is obsolete.
OleConvertIStorageToOLESTREAM

The OleConvertIStorageToOLESTREAM function converts the specified storage object from OLE 2 structured storage to the OLE 1 storage object model but does not include the presentation data. This is one of several compatibility functions.
OleConvertIStorageToOLESTREAMEx

The OleConvertIStorageToOLESTREAMEx function converts the specified storage object from OLE 2 structured storage to the OLE 1 storage object model, including the presentation data.
OleConvertOLESTREAMToIStorage

Converts the specified object from the OLE 1 storage model to an OLE 2 structured storage object without specifying presentation data.
OleConvertOLESTREAMToIStorageEx

The OleConvertOLESTREAMToIStorageEx function converts the specified object from the OLE 1 storage model to an OLE 2 structured storage object including presentation data. This is one of several compatibility functions.
OleCreate

The OleCreate function (ole2.h) creates an embedded object identified by a CLSID. It can implement the menu item that allows the end user to insert an object.
OleCreateDefaultHandler

Creates a new instance of the default embedding handler. This instance is initialized so it creates a local server when the embedded object enters the running state.
OleCreateEmbeddingHelper

Creates an OLE embedding helper object using application-supplied code aggregated with pieces of the OLE default object handler. This helper object can be created and used in a specific context and role, as determined by the caller.
OleCreateEx

Extends OleCreate functionality by supporting more efficient instantiation of objects in containers requiring caching of multiple presentation formats or data, instead of the single format supported by OleCreate.
OleCreateFromData

Creates an embedded object from a data transfer object retrieved either from the clipboard or as part of an OLE drag-and-drop operation. It is intended to be used to implement a paste from an OLE drag-and-drop operation.
OleCreateFromDataEx

Extends OleCreateFromData functionality by supporting more efficient instantiation of objects in containers requiring caching of multiple formats of presentation or data, instead of the single format supported by OleCreateFromData.
OleCreateFromFile

The OleCreateFromFile function (ole2.h) creates an embedded object from the contents of a named file.
OleCreateFromFileEx

Extends OleCreateFromFile functionality by supporting more efficient instantiation of objects in containers requiring caching of multiple presentation formats or data, instead of the single format supported by OleCreateFromFile.
OleCreateLink

Creates an OLE compound-document linked object.
OleCreateLinkEx

Extends OleCreateLink functionality by supporting more efficient instantiation of objects in containers requiring caching of multiple formats of presentations or data, instead of the single format supported by OleCreateLink.
OleCreateLinkFromData

Creates a linked object from a data transfer object retrieved either from the clipboard or as part of an OLE drag-and-drop operation.
OleCreateLinkFromDataEx

Extends OleCreateLinkFromData functionality by supporting more efficient instantiation of objects in containers requiring caching of multiple formats of presentations or data, instead of the single format supported by OleCreateLinkFromData.
OleCreateLinkToFile

Creates an object that is linked to a file.
OleCreateLinkToFileEx

Extends OleCreateLinkToFile functionality by supporting more efficient instantiation of objects in containers requiring caching of multiple formats of presentations or data, instead of the single format supported by OleCreateLinkToFile.
OleCreateMenuDescriptor

Creates and returns an OLE menu descriptor (that is, an OLE-provided data structure that describes the menus) for OLE to use when dispatching menu messages and commands.
OleCreateStaticFromData

Creates a static object, that contains only a representation, with no native data, from a data transfer object.
OleDestroyMenuDescriptor

Called by the container to free the shared menu descriptor allocated by the OleCreateMenuDescriptor function.
OleDoAutoConvert

Automatically converts an object to a new class if automatic conversion for that object class is set in the registry.
OleDraw

The OleDraw function (ole2.h) enables drawing objects more easily. You can use it instead of calling IViewObject::Draw directly.
OleDuplicateData

Duplicates the data found in the specified handle and returns a handle to the duplicated data. The source data is in a clipboard format. Use this function to help implement some of the data transfer interfaces such as IDataObject.
OleFlushClipboard

Carries out the clipboard shutdown sequence. It also releases the IDataObject pointer that was placed on the clipboard by the OleSetClipboard function.
OleGetAutoConvert

Determines whether the registry is set for objects of a specified CLSID to be automatically converted to another CLSID, and if so, retrieves the new CLSID.
OleGetClipboard

Retrieves a data object that you can use to access the contents of the clipboard.
OleGetClipboardWithEnterpriseInfo

Enables Windows Information Protection enlightened applications to retrieve an IDataObject from the OLE Clipboard accompanied by Windows Information Protection information about the data and the source application.
OleGetIconOfClass

Returns a handle to a metafile containing an icon and a string label for the specified CLSID.
OleGetIconOfFile

Returns a handle to a metafile containing an icon and string label for the specified file name.
OleInitialize

Initializes the COM library on the current apartment, identifies the concurrency model as single-thread apartment (STA), and enables additional functionality described in the Remarks section below.
OleIsCurrentClipboard

Determines whether the data object pointer previously placed on the clipboard by the OleSetClipboard function is still on the clipboard.
OleIsRunning

Determines whether a compound document object is currently in the running state.
OleLoad

Loads into memory an object nested within a specified storage object.
OleLoadFromStream

The OleLoadFromStream function (ole2.h) loads an object from the stream.
OleLockRunning

Locks an already running object into its running state or unlocks it from its running state. (OleLockRunning)
OleMetafilePictFromIconAndLabel

Creates a metafile in which the specified icon and label are drawn.
OleNoteObjectVisible

Increments or decrements an external reference that keeps an object in the running state.
OleQueryCreateFromData

Checks whether a data object has one of the formats that would allow it to become an embedded object through a call to either the OleCreateFromData or OleCreateStaticFromData function.
OleQueryLinkFromData

Determines whether an OLE linked object (rather than an OLE embedded object) can be created from a clipboard data object.
OleRegEnumFormatEtc

Creates an enumeration object that can be used to enumerate data formats that an OLE object server has registered in the system registry.
OleRegEnumVerbs

Supplies an enumeration of the registered verbs for the specified class. Developers of custom DLL object applications use this function to emulate the behavior of the default object handler.
OleRegGetMiscStatus

Returns miscellaneous information about the presentation and behaviors supported by the specified CLSID from the registry.
OleRegGetUserType

Gets the user type of the specified class from the registry.
OleRun

Puts an OLE compound document object into the running state.
OleSave

Saves an object opened in transacted mode into the specified storage object.
OleSaveToStream

The OleSaveToStream function (ole2.h) saves an object with the IPersistStream interface on it to the specified stream.
OleSetAutoConvert

Specifies a CLSID for automatic conversion to a different class when an object of that class is loaded.
OleSetClipboard

Places a pointer to a specific data object onto the clipboard. This makes the data object accessible to the OleGetClipboard function.
OleSetContainedObject

Notifies an object that it is embedded in an OLE container, which ensures that reference counting is done correctly for containers that support links to embedded objects. (OleSetContainedObject)
OleSetMenuDescriptor

Installs or removes OLE dispatching code from the container's frame window.
OleTranslateAccelerator

Called by the object application, allows an object's container to translate accelerators according to the container's accelerator table.
OleUninitialize

Closes the COM library on the apartment, releases any class factories, other COM objects, or servers held by the apartment, disables RPC on the apartment, and frees any resources the apartment maintains.
ReadFmtUserTypeStg

The ReadFmtUserTypeStg function returns the clipboard format and user type previously saved with the WriteFmtUserTypeStg function.
RegisterDragDrop

Registers the specified window as one that can be the target of an OLE drag-and-drop operation and specifies the IDropTarget instance to use for drop operations.
ReleaseStgMedium

Frees the specified storage medium.
RevokeDragDrop

Revokes the registration of the specified application window as a potential target for OLE drag-and-drop operations.
SetConvertStg

The SetConvertStg function sets the convert bit in a storage object to indicate that the object is to be converted to a new class when it is opened. The setting can be retrieved with a call to the GetConvertStg function.
WriteFmtUserTypeStg

The WriteFmtUserTypeStg function writes a clipboard format and user type to the storage object.