Home COM GDI+ WebBrowser Data Access

OLE and Data Transfer Functions

 

 

CreateDataAdviseHolder
CreateDataCache
CreateFormatEnumerator
CreateOleAdviseHolder
DoDragDrop
OleCreate
OleCreateDefaultHandler
OleCreateEmbeddingHelper
OleCreateEx
OleCreateFontIndirect
OleCreateFromData
OleCreateFromDataEx
OleCreateFromFile
OleCreateFromFileEx
OleCreateLink
OleCreateLinkEx
OleCreateLinkFromData
OleCreateLinkFromDataEx
OleCreateLinkToFile
OleCreateLinkToFileEx
OleCreateMenuDescriptor
OleCreatePictureIndirect
OleCreateStaticFromData
OleDestroyMenuDescriptor
OleDraw
OleDuplicateData
OleFlushClipboard
OleGetClipboard
OleInitialize
OleIsCurrentClipboard
OleIsRunning
OleLoad

OleLoadFromStream
 

 

OleLoadPicture
OleLoadPictureEx
OleLockRunning
OleMetafilePictFromIconAndLabel
OleNoteObjectVisible
OleQueryCreateFromData
OleQueryLinkFromData
OleRegEnumFormatEtc
OleRegEnumVerbs
OleRun
OleSave
OleSaveToStream
OleSetClipboard
OleSetContainedObject
OleSetMenuDescriptor
OleTranslateAccelerator
OleUIAddVerbMenu
OleUIBusy
OleUICanConvertOrActivateAs
OleUIChangeIcon
OleUIChangeSource
OleUIConvert
OleUIEditLinks
OleUIInsertObject
OleUIObjectProperties
OleUIPasteSpecial
OleUIPromptUser
OleUIUpdateLinks
OleUninitialize
RegisterDragDrop
ReleaseStgMedium
RevokeDragDrop

 

CreateDataAdviseHolder

 

Supplies a pointer to the OLE implementation of IDataAdviseHolder on the data advise holder object.

 

 

DECLARE FUNCTION CreateDataAdviseHolder _
   LIB "OLE32.DLL" _
   ALIAS "CreateDataAdviseHolder" ( _
   BYREF ppDAHolder AS DWORD _
) AS LONG

 

 

CreateDataCache

 

Supplies a pointer to a new instance of an OLE-provided implementation of a data cache.

 

 

DECLARE FUNCTION CreateDataCache _
   LIB "OLE32.DLL" _
   ALIAS "CreateDataCache" ( _
   BYVAL pUnkOuter AS DWORD, _
   BYREF rclsid AS GUID, _
   BYREF riid AS GUID, _
   BYREF ppvObj AS DWORD _
) AS LONG

 

 

CreateFormatEnumerator

 

Creates an object that implements IEnumFORMATETC over a static array of FORMATETC structures.

 

 

DECLARE FUNCTION CreateFormatEnumerator _
   LIB "OLE32.DLL" _
   ALIAS "CreateFormatEnumerator" ( _

   BYVAL cfmtetc AS DWORD, _
   BYREF rgfmtetc AS FORMATETC, _
   BYREF ppenumfmtetc AS DWORD _
) AS LONG

 

 

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.

 

 

DECLARE FUNCTION CreateOleAdviseHolder _
   LIB "OLE32.DLL" _
   ALIAS "CreateOleAdviseHolder" ( _

   BYREF ppOAHolder AS DWORD _
) AS LONG

 

 

DoDragDrop

 

Carries out an OLE drag and drop operation.

 

 

DECLARE FUNCTION DoDragDrop _
   LIB "OLE32.DLL" _
   ALIAS "DoDragDrop" ( _
   BYVAL pDataObject AS DWORD, _
   BYVAL pDropSource AS DWORD, _
   BYVAL dwOKEffect AS DWORD, _
   BYREF pdwEffect AS DWORD _
) AS LONG

 

 

OleCreate

 

Creates an embedded object identified by a CLSID. You use it typically to implement the menu item that allows the end user to insert a new object.

 

 

DECLARE FUNCTION OleCreate _
   LIB "OLE32.DLL" _
   ALIAS "OleCreate" ( _
   BYREF rclsid AS GUID, _
   BYREF riid AS GUID, _
   BYVAL renderopt AS DWORD, _
   BYREF pFormatEtc AS FORMATETC, _
   BYVAL pClientSite AS DWORD, _
   BYVAL pStg AS DWORD, _
   BYREF ppvObject AS DWORD _
) AS LONG

 

 

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.

 

 

DECLARE FUNCTION OleCreateDefaultHandler _
   LIB "OLE32.DLL" _
   ALIAS "OleCreateDefaultHandler" ( _
   BYREF rclsid AS GUID, _
   BYVAL pUnkOuter AS DWORD, _
   BYREF riid AS GUID, _
   BYREF ppvObj AS DWORD _
) AS LONG

 

 

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.

 

 

DECLARE FUNCTION OleCreateEmbeddingHelper _
   LIB "OLE32.DLL" _
   ALIAS "OleCreateEmbeddingHelper" ( _
   BYREF rclsid AS GUID, _
   BYVAL pUnkOuter AS DWORD, _
   BYVAL flags AS DWORD, _
   BYVAL pCF AS DWORD, _
   BYREF riid AS GUID, _
   BYREF ppvObj AS DWORD _
) AS LONG
 

 

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.

 

 

DECLARE FUNCTION OleCreateEx _
   LIB "OLE32.DLL" _
   ALIAS "OleCreateEx" ( _
   BYREF rclsid AS GUID, _
   BYREF riid AS GUID, _
   BYVAL dwFlags AS DWORD, _
   BYVAL renderopt AS DWORD, _
   BYVAL cFormats AS DWORD, _
   BYVAL rgAdvf AS DWORD, _
   BYREF rgFormatEtc AS FORMATETC, _
   BYVAL pAdviseSink AS DWORD, _
   BYREF rgdwConnection AS DWORD, _
   BYVAL pClientSite AS DWORD, _
   BYVAL pStg AS DWORD, _
   BYREF ppvObj AS DWORD _
) AS LONG
 

 

OleCreateFontIndirect

 

Creates and initializes a standard font object using an initial description of the font's properties in a FONTDESC structure. The function returns an interface pointer to the new font object specified by caller in the riid parameter. A QueryInterface is built into this call. The caller is responsible for calling Release through the interface pointer returned.

 

 

DECLARE FUNCTION OleCreateFontIndirect _
   LIB
"OLEPRO32.DLL" _
   ALIAS
"OleCreateFontIndirect" ( _
   BYREF
pFontDesc AS FONTDESC, _
   BYREF
riid AS GUID, _
   BYREF
ppvObj AS DWORD _
) AS LONG

 

 

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.

 

 

DECLARE FUNCTION OleCreateFromData _
   LIB "OLE32.DLL" _
   ALIAS "OleCreateFromData" ( _
   BYVAL pSrcDataObj AS DWORD, _
   BYREF riid AS GUID, _
   BYVAL renderopt AS DWORD, _
   BYREF pFormatEtc AS FORMATETC, _
   BYVAL pClientSite AS DWORD, _
   BYVAL pStg AS DWORD, _
   BYREF ppvObj AS DWORD _
) AS LONG

 

 

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.

 

 

DECLARE FUNCTION OleCreateFromDataEx _
   LIB "OLE32.DLL" _
   ALIAS "OleCreateFromDataEx" ( _
   BYVAL pSrcDataObj AS DWORD, _
   BYREF riid AS GUID, _
   BYVAL dwFlags AS DWORD, _
   BYVAL renderopt AS DWORD, _
   BYVAL cFormats AS DWORD, _
   BYVAL rgAdvf AS DWORD, _
   BYVAL rgFormatEtc AS FORMATETC PTR, _
   BYVAL pAdviseSink AS DWORD, _
   BYVAL rgdwConnection AS DWORD, _
   BYVAL pClientSite AS DWORD, _
   BYVAL pStg AS DWORD, _
   BYREF ppvObj AS DWORD _
) AS LONG

 

 

OleCreateFromFile

 

Creates an embedded object from the contents of a named file.

 

OleCreateFromFile() Does Not Check for Reserved Names

Before an OLE 2.0 container application calls OleCreateFromFile() to create an embedded object from the contents of a named file, it must make sure that the filename it passes as the lpszFile parameter to OleCreateFromFile() is not a reserved MS-DOS device name, such as COM1 or LPT1. This check is necessary because OleCreateFromFile() does not perform such a check itself.

A container application generally obtains the filename to pass to OleCreateFromFile() by presenting the user with the Insert Object dialog box. Many containers use the OLE2UI library implementation of the Insert Object dialog box, by calling OleUIInsertObject(). OleUIInsertObject() performs a check to make sure that the filename supplied by the user is not a reserved MS-DOS device name; if the user supplies a filename such as "COM1", OleUIInsertObject() brings up a modal dialog box stating "File COM1 Does Not Exist."

Therefore, container applications that use OleUIInsertObject() do not have to perform a check for reserved names
 

 

DECLARE FUNCTION OleCreateFromFile _
   LIB "OLE32.DLL" _
   ALIAS "OleCreateFromFile" ( _
   BYREF rclsid AS GUID, _
   BYVAL lpszFileName AS STRING, _  ' Null-terminated unicode string
   BYREF riid AS GUID, _
   BYVAL renderopt AS DWORD, _
   BYREF pFormatEtc AS FORMATETC, _
   BYVAL pClientSite AS DWORD, _
   BYVAL pStg AS DWORD, _
   BYREF ppvObj AS DWORD _
) AS LONG
 

 

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.

 

 

DECLARE FUNCTION OleCreateFromFileEx _
   LIB "OLE32.DLL" _
   ALIAS "OleCreateFromFileEx" ( _
   BYREF rclsid AS GUID, _
   BYVAL lpszFileName AS STRING, _  ' Null-terminated unicode string
   BYREF riid AS GUID, _
   BYVAL dwFlags AS DWORD, _
   BYVAL renderopt AS DWORD, _
   BYVAL cFormats AS DWORD, _
   BYVAL rgAdvf AS DWORD, _
   BYVAL rgFormatEtc AS FORMATETC PTR, _
   BYVAL pAdviseSink AS DWORD, _
   BYVAL rgdwConnection AS DWORD, _
   BYVAL pClientSite AS DWORD, _
   BYVAL pStg AS DWORD, _
   BYREF ppvObj AS DWORD _
) AS LONG
 

 

OleCreateLink

 

Creates an OLE compound-document linked object.

 

 

DECLARE FUNCTION OleCreateLink _
   LIB "OLE32.DLL" _
   ALIAS "OleCreateLink" ( _
   BYVAL pmkLinkSrc AS DWORD, _
   BYREF riid AS GUID, _
   BYVAL renderopt AS DWORD, _
   BYREF pFormatEtc AS FORMATETC, _
   BYVAL pCLientSite AS DWORD, _
   BYVAL pStg AS DWORD, _
   BYREF ppvObj AS DWORD _
) AS LONG
 

 

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.

 

 

DECLARE FUNCTION OleCreateFromLinkEx _
   LIB "OLE32.DLL" _
   ALIAS "OleCreateFromLinkEx" ( _
   BYVAL pmkLinkSrc AS DWORD, _
   BYREF riid AS GUID, _
   BYVAL dwFlags AS DWORD, _
   BYVAL renderopt AS DWORD, _
   BYVAL cFormats AS DWORD, _
   BYVAL rgAdvf AS DWORD, _
   BYVAL rgFormatEtc AS FORMATETC PTR, _
   BYVAL pAdviseSink AS DWORD, _
   BYVAL rgdwConnection AS DWORD, _
   BYVAL pClientSite AS DWORD, _
   BYVAL pStg AS DWORD, _
   BYREF ppvObj AS DWORD _
) AS LONG

 

 

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.

 

 

DECLARE FUNCTION OleCreateLinkFromData _
   LIB "OLE32.DLL" _
   ALIAS "OleCreateLinkFromData" ( _
   BYVAL pSrcDataObj AS DWORD, _
   BYREF riid AS GUID, _
   BYVAL renderopt AS DWORD, _
   BYREF pFormatEtc AS FORMATETC, _
   BYVAL pClientSite AS DWORD, _
   BYVAL pStg AS DWORD, _
   BYREF ppvObj AS DWORD _
) AS LONG

 

 

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.

 

 

DECLARE FUNCTION OleCreateLinkFromDataEx _
   LIB "OLE32.DLL" _
   ALIAS "OleCreateLinkFromDataEx" ( _
   BYVAL pSrcDataObj AS DWORD, _
   BYREF riid AS GUID, _
   BYVAL dwFlags AS DWORD, _
   BYVAL renderopt AS DWORD, _
   BYVAL cFormats AS DWORD, _
   BYVAL rgAdvf AS DWORD, _
   BYVAL rgFormatEtc AS DWORD, _
   BYVAL pAdviseSink AS DWORD, _
   BYVAL rgdwConnection AS DWORD, _
   BYVAL pClientSite AS DWORD, _
   BYVAL pStg AS DWORD, _
   BYREF ppvObj AS DWORD _
) AS LONG

 

 

OleCreateLinkToFile

 

Creates an object that is linked to a file.

 

 

DECLARE FUNCTION OleCreateLinkToFile _
   LIB "OLE32.DLL" _
   ALIAS "OleCreateLinkToFile" ( _
   BYVAL lpszFileName AS STRING, _  ' Null-terminated unicode string
   BYREF riid AS GUID, _
   BYVAL renderopt AS DWORD, _
   BYREF pFormatEtc AS FORMATETC, _
   BYVAL pClientSite AS DWORD, _
   BYVAL pStg AS DWORD, _
   BYREF ppvObj AS DWORD _
) AS LONG

 

 

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.

 

 

DECLARE FUNCTION OleCreateLinkToFileEx _
   LIB "OLE32.DLL" _
   ALIAS "OleCreateLinkToFileEx" ( _
   BYVAL lpszFileName AS DWORD, _
   BYREF riid AS GUID, _
   BYVAL dwFlags AS DWORD, _
   BYVAL renderopt AS DWORD, _
   BYVAL cFormats AS DWORD, _
   BYVAL rgAdvf AS DWORD, _
   BYVAL rgFormatEtc AS DWORD, _
   BYVAL pAdviseSink AS DWORD, _
   BYVAL rgdwConnection AS DWORD, _
   BYVAL pClientSite AS DWORD, _
   BYVAL pStg AS DWORD, _
   BYREF ppvObj AS DWORD _
) AS LONG

 

 

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.

 

 

DECLARE FUNCTION OleCreateMenuDescriptor _
   LIB "OLE32.DLL" _
   ALIAS "OleCreateMenuDescriptor" ( _
   BYVAL hmenuCombined AS DWORD, _
   BYREF lpMenuWidths AS OLEMENUGROUPWIDTHS _
) AS DWORD
 

 

OleCreatePictureIndirect

 

Creates a new picture object initialized according to a PICTDESC structure, which can be NULL to create an uninitialized object if the caller wishes to have the picture initialize itself through IPersistStream::Load. The fOwn parameter indicates whether the picture is to own the GDI picture handle for the picture it contains, so that the picture object will destroy its picture when the object itself is destroyed. The function returns an interface pointer to the new picture object specified by the caller in the riid parameter. A QueryInterface is built into this call. The caller is responsible for calling Release through the interface pointer returned.

 

 

DECLARE FUNCTION OleCreatePictureIndirect _
   LIB "OLE32.DLL" _
   ALIAS "OleCreatePictureIndirect" ( _
   BYREF pPictDesc AS PICTDESC, _
   BYREF riid AS GUID, _
   BYVAL fOwn AS LONG, _
   BYREF ppvObj AS DWORD _
) AS LONG
 

 

OleCreateStaticFromData

 

Creates a static object (containing only a representation, with no native data) from a data transfer object.

 

 

DECLARE FUNCTION OleCreateStaticFromData _
   LIB "OLE32.DLL" _
   ALIAS "OleCreateStaticFromData" ( _
   BYVAL pSrcDataObj AS DWORD, _
   BYREF riid AS GUID, _
   BYVAL renderopt AS DWORD, _
   BYVAL pFormatEtc AS FORMATETC, _
   BYVAL pClientSite AS DWORD, _
   BYVAL pStg AS DWORD, _
   BYREF ppvObj AS DWORD _
) AS LONG
 

 

OleDestroyMenuDescriptor

 

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

 

 

DECLARE SUB OleDestroyMenuDescriptor _
   LIB "OLE32.DLL" _
   ALIAS "OleDestroyMenuDescriptor" ( _
   BYVAL holemenu AS DWORD _
)
 

 

OleDraw

 

The OleDraw helper function can be used to draw objects more easily. You can use it instead of calling IViewObject::Draw directly.

 

 

DECLARE FUNCTION OleDraw _
   LIB "OLE32.DLL" _
   ALIAS "OleDraw" ( _
   BYVAL pUnk AS DWORD, _
   BYVAL dwAspect AS DWORD, _
   BYVAL hdcDraw AS DWORD, _
   BYREF lprcBounds AS RECT _
) AS LONG

 

 

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.

 

 

DECLARE FUNCTION OleDuplicateData _
   LIB "OLE32.DLL" _
   ALIAS "OleDuplicateData" ( _
   BYVAL hSrc AS DWORD, _
   BYVAL cfFormat AS DWORD, _
   BYVAL uiFlags AS DWORD _
) AS DWORD

 

 

OleFlushClipboard

 

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

 

 

DECLARE FUNCTION OleFlushClipboard _

   LIB "OLE32.DLL" _

   ALIAS "OleFlushClipboard" ( _
) AS LONG

 

 

OleGetClipboard

 

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

 

 

DECLARE FUNCTION OleGetClipboard _
   LIB "OLE32.DLL" _
   ALIAS "OleGetClipboard" ( _
   BYREF ppDataObj AS DWORD _
) AS LONG
 

 

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. Applications must initialize the COM library before they can call COM library functions other than CoGetMalloc and memory allocation functions.

 

Applications that do not require the additional functionality enabled by OleInitialize should call CoInitializeEx instead of OleInitialize.

 

 

DECLARE FUNCTION OleInitialize _
   LIB "OLE32.DLL" _
   ALIAS "OleInitialize" ( _
   BYVAL pvReserved AS DWORD _
) AS LONG
 

 

OleIsCurrentClipboard

 

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

 

 

DECLARE FUNCTION OleIsCurrentClipboard _
   LIB "OLE32.DLL" _
   ALIAS "OleIsCurrentClipboard" ( _
   BYVAL pDataObject AS DWORD _
) AS LONG
 

 

OleIsRunning

 

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

 

 

DECLARE FUNCTION OleIsRunning _
   LIB "OLE32.DLL" _
   ALIAS "OleIsRunning" ( _
   BYVAL pObject AS DWORD _
) AS LONG
 

 

OleLoad

 

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

 

 

DECLARE FUNCTION OleLoad _
   LIB "OLE32.DLL" _
   ALIAS "OleLoad" ( _
   BYVAL pStg AS DWORD, _
   BYREF riid AS GUID, _
   BYVAL pClientSite AS DWORD, _
   BYREF ppvObj AS DWORD _
) AS LONG
 

 

OleLoadFromStream

 

Loads an object from the stream.

 

 

DECLARE FUNCTION OleLoadFromStream _
   LIB "OLE32.DLL" _
   ALIAS "OleLoadFromStream" ( _
   BYVAL pStm AS DWORD, _
   BYREF iidInterface AS GUID, _
   BYREF ppvObj AS DWORD _
) AS LONG
 

 

OleLoadPicture

 

Loads an object from the stream.

 

 

DECLARE FUNCTION OleLoadPicture _
   LIB "OLE32.DLL" _
   ALIAS "OleLoadPicture" ( _
   BYVAL pStream AS DWORD, _
   BYVAL lSize AS LONG, _
   BYVAL fRunmode AS LONG, _
   BYREF riid AS GUID, _
   BYREF ppvObj AS DWORD _
) AS LONG

 

 

OleLoadPictureEx

 

Creates a new picture object and initializes it from the contents of a stream. This is equivalent to calling OleCreatePictureIndirect(NULL, ...)followed by IPersistStream::Load.

 

 

DECLARE FUNCTION OleLoadPictureEx _
   LIB "OLE32.DLL" _
   ALIAS "OleLoadPictureEx" ( _
   BYVAL pStream AS DWORD, _
   BYVAL lSize AS LONG, _
   BYVAL fRunmode AS LONG, _
   BYREF riid AS GUID, _
   BYVAL xSizeDesired AS DWORD, _
   BYVAL ySizeDesired AS DWORD, _
   BYVAL dwFlags AS DWORD, _
   BYREF ppvObj AS DWORD _
) AS LONG

 

 

OleLockRunning

 

Locks an already running object into its running state or unlocks it from its running state.

 

 

DECLARE FUNCTION OleLockRunning _
   LIB "OLE32.DLL" _
   ALIAS "OleLockRunning" ( _
   BYVAL pUnknown AS DWORD, _
   BYVAL fLock AS LONG, _
   BYVAL fLastUnlockCloses AS LONG _
) AS LONG

 

 

OleMetafilePictFromIconAndLabel

 

Creates a METAFILEPICT structure that contains a metafile in which the icon and label are drawn.

 

 

DECLARE FUNCTION OleMetafilePictFromIconAndLabel _
   LIB "OLE32.DLL" _
   ALIAS "OleMetafilePictFromIconAndLabel" ( _
   BYVAL hIcon AS DWORD, _
   BYVAL lpszLabel AS DWORD, _
   BYVAL lpszSourceFile AS DWORD, _
   BYVAL iIconIndex AS DWORD _
) AS DWORD

 

 

OleNoteObjectVisible

 

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

 

 

DECLARE FUNCTION OleNoteObjectVisible _
   LIB "OLE32.DLL" _
   ALIAS "OleNoteObjectVisible" ( _
   BYVAL pUnknown AS DWORD, _
   BYVAL fVisible AS LONG _
) AS LONG

 

 

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.

 

 

DECLARE FUNCTION OleQueryCreateFromData _
   LIB "OLE32.DLL" _
   ALIAS "OleQueryCreateFromData" ( _
   BYVAL pSrcDataObject AS DWORD _
) AS LONG

 

 

OleQueryLinkFromData

 

The OleQueryLinkFromData function determines whether an OLE linked object (rather than an OLE embedded object) can be created from a clipboard data object.

 

 

DECLARE FUNCTION OleQueryLinkFromData _
   LIB "OLE32.DLL" _
   ALIAS "OleQueryLinkFromData" ( _
   BYVAL pSrcDataObject AS DWORD _
) AS LONG
 

 

OleRegEnumFormatEtc

 

Supplies a pointer to an enumeration object that can be used to enumerate data formats that an OLE object server has registered in the system registry. An object application or object handler calls this function when it must enumerate those formats. Developers of custom DLL object applications use this function to emulate the behavior of the default object handler.

 

 

DECLARE FUNCTION OleRegEnumFormatEtc _
   LIB "OLE32.DLL" _
   ALIAS "OleRegEnumFormatEtc" ( _
   BYREF rclsid AS GUID, _

   BYVAL dwDirection AS DWORD, _

   BYREF ppenumFormatetc AS DWORD _
) AS LONG
 

 

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.

 

 

DECLARE FUNCTION OleRegEnumVerbs _
   LIB "OLE32.DLL" _
   ALIAS "OleRegEnumVerbs" ( _
   BYREF rclsid AS GUID, _

   BYREF ppenumOleVerb AS DWORD _
) AS LONG
 

 

OleRun

 

Puts an OLE compound document object into the running state.

 

 

DECLARE FUNCTION OleRun _
   LIB "OLE32.DLL" _
   ALIAS "OleRun" ( _
   BYVAL pUnknown AS DWORD _
) AS LONG
 

 

OleSave

 

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

 

 

DECLARE FUNCTION OleSave _
   LIB "OLE32.DLL" _
   ALIAS "OleSave" ( _

   BYVAL pPS AS DWORD, _

   BYVAL pStg AS DWORD, _
   BYVAL fSameAsLoad AS LONG _
) AS LONG
 

 

OleSaveToStream

 

Saves an object with the IPersistStream interface on it to the specified stream.

 

 

DECLARE FUNCTION OleSaveToStream _
   LIB "OLE32.DLL" _
   ALIAS "OleSaveToStream" ( _

   BYVAL pPStm AS DWORD, _

   BYVAL pStm AS DWORD _
) AS LONG
 

 

OleSetClipboard

 

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

 

 

DECLARE FUNCTION OleSetClipboard _
   LIB "OLE32.DLL" _
   ALIAS "OleSetClipboard" ( _

   BYVAL pDataObj AS DWORD _
) AS LONG
 

 

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.

 

 

DECLARE FUNCTION OleSetContainedObject _
   LIB "OLE32.DLL" _
   ALIAS "OleSetContainedObject" ( _

   BYVAL pUnk AS DWORD, _

   BYVAL fContained AS LONG _
) AS LONG
 

 

OleSetMenuDescriptor

 

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

 

 

DECLARE FUNCTION OleSetMenuDescriptor _
   LIB "OLE32.DLL" _
   ALIAS "OleSetMenuDescriptor" ( _

   BYVAL holemenu AS DWORD, _

   BYVAL hwndFrame AS DWORD, _

   BYVAL hwndActiveObject AS DWORD, _

   BYVAL lpFrame AS DWORD, _

   BYVAL lpActiveObj AS DWORD _

) AS LONG
 

 

OleTranslateAccelerator

 

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

 

 

DECLARE FUNCTION OleTranslateAccelerator _
   LIB "OLE32.DLL" _
   ALIAS "OleTranslataAccelerator" ( _

   BYVAL lpFrame AS DWORD, _

   BYVAL lpFrameInfo AS DWORD, _

   BYREF lpMsg AS tagMsg _

) AS LONG
 

 

OleUIAddVerbMenu

 

Adds the Verb menu for the specified object to the given menu.

 

 

DECLARE FUNCTION OleUIAddVerbMenu _
   LIB "OLE32.DLL" _
   ALIAS "OleUIAddVerbMenu" ( _

   BYVAL lpOleObj AS DWORD, _

   BYREF lpszShortType AS ASCIIZ, _

   BYVAL hMenu AS DWORD, _

   BYVAL uPos AS DWORD, _

   BYVAL uIDVerbMin AS DWORD, _

   BYVAL uIDVerbMax AS DWORD, _

   BYVAL bAddConvert AS LONG, _

   BYVAL idConvert AS DWORD, _

   BYREF lphMenu AS DWORD _

) AS LONG

 

DECLARE FUNCTION OleUIAddVerbMenuW _
   LIB "OLE32.DLL" _
   ALIAS "OleUIAddVerbMenuW" ( _

   BYVAL lpOleObj AS DWORD, _

   BYVAL lpszShortType AS STRING, _  ' Null-terminated unicode string

   BYVAL hMenu AS DWORD, _

   BYVAL uPos AS DWORD, _

   BYVAL uIDVerbMin AS DWORD, _

   BYVAL uIDVerbMax AS DWORD, _

   BYVAL bAddConvert AS LONG, _

   BYVAL idConvert AS DWORD, _

   BYREF lphMenu AS DWORD _

) AS LONG

 

 

OleUIBusy

 

Invokes the standard Busy dialog box, allowing the user to manage concurrency.

 

 

DECLARE FUNCTION OleUIBusy _
   LIB "OLE32.DLL" _
   ALIAS "OleUIBusy" ( _

   BYREF lpBZ AS OLEUIBUSY _

) AS DWORD
 

 

OleUICanConvertOrActivateAs

 

Determines if there are any OLE object classes in the registry that can be used to convert or activate the specified CLSID from.

 

 

DECLARE FUNCTION OleUICanConvertOrActivateAs _
   LIB "OLE32.DLL" _
   ALIAS "OleUICanConvertOrActivateAs" ( _

   BYREF rclsid AS GUID, _

   BYVAL fIsLinkedObject AS LONG, _

   BYVAL wFormat AS WORD _

) AS LONG
 

 

OleUIChangeIcon

 

Invokes the standard Change Icon dialog box, which allows the user to select an icon from an icon file, executable, or DLL.

 

 

DECLARE FUNCTION OleUIChangeIcon _
   LIB "OLE32.DLL" _
   ALIAS "OleUIChangeIcon" ( _

   BYREF lpCI AS OLEUICHANGEICON _

) AS DWORD
 

 

OleUIChangeSource

 

Invokes the Change Source dialog box, allowing the user to change the source of a link.

 

 

DECLARE FUNCTION OleUIChangeSource _
   LIB "OLE32.DLL" _
   ALIAS "OleUIChangeSource" ( _

   BYREF lpCS AS OLEUICHANGESOURCE _

) AS DWORD
 

 

OleUIConvert

 

Invokes the standard Convert dialog box, allowing the user to change the type of a single specified object, or the type of all OLE objects of the specified object's class.

 

 

DECLARE FUNCTION OleUIConvert _
   LIB "OLE32.DLL" _
   ALIAS "OleUIConvert" ( _

   BYREF lpCV AS OLEUICONVERT _

) AS DWORD
 

 

OleUIEditLinks

 

Invokes the standard Links dialog box, allowing the user to make modifications to a container's linked objects.

 

 

DECLARE FUNCTION OleUIEditLinks _
   LIB "OLE32.DLL" _
   ALIAS "OleUIEditLinks" ( _

   BYREF lpEL AS OLEUIEDITLINKS _

) AS DWORD
 

 

OleUIInsertObject

 

Invokes the standard Insert Object dialog box, which allows the user to select an object source and class name, as well as the option of displaying the object as itself or as an icon.

 

 

DECLARE FUNCTION OleUIInsertObject _
   LIB "OLE32.DLL" _
   ALIAS "OleUIInsertObject" ( _

   BYREF lpIO AS OLEUIINSERTOBJECT _

) AS DWORD
 

 

OleUIObjectProperties

 

Invokes the Object Properties dialog box, which displays General, View, and Link information about an object.

 

 

DECLARE FUNCTION OleUIObjectProperties _
   LIB "OLE32.DLL" _
   ALIAS "OleUIObjectProperties" ( _

   BYREF lpOP AS OLEUIOBJECTPROPS _

) AS DWORD
 

 

OleUIPasteSpecial

 

Invokes the standard Paste Special dialog box, allowing the user to select the format of the clipboard object to be pasted or paste-linked.

 

 

DECLARE FUNCTION OleUIPasteSpecial _
   LIB "OLE32.DLL" _
   ALIAS "OleUIPasteSpecial" ( _

   BYREF lpPS AS OLEUIPASTESPECIAL _

) AS DWORD
 

 

OleUIPromptUser

 

Displays a dialog box with the specified template and returns the response (button identifier) from the user. This function is used to display OLE warning messages, for example, Class Not Registered.

 

 

DECLARE FUNCTION OleUIPromptUser _
   LIB "OLE32.DLL" _
   ALIAS "OleUIPromptUser" ( _

   BYVAL nTemplate AS LONG, _

   BYVAL hwndParent AS DWORD _

) AS LONG
 

 

OleUIUpdateLinks

 

Updates all links in the link container and displays a dialog box that shows the progress of the updating process. The process is stopped if the user presses the Stop button or when all links are processed.

 

 

DECLARE FUNCTION OleUIUpdateLinks _
   LIB "OLE32.DLL" _
   ALIAS "OleUIUpdateLinks" ( _

   BYVAL lpOleUILinkCntr AS DWORD, _

   BYVAL hwndParent AS DWORD, _

   BYREF lpszTitle AS ASCIIZ, _

   BYVAL cLinks AS LONG _

) AS LONG

 

DECLARE FUNCTION OleUIUpdateLinksW _
   LIB "OLE32.DLL" _
   ALIAS "OleUIUpdateLinksW" ( _

   BYVAL lpOleUILinkCntr AS STRING, _  ' Null-terminated unicode string

   BYVAL hwndParent AS DWORD, _

   BYVAL lpszTitle AS DWORD, _

   BYVAL cLinks AS LONG _

) AS LONG


 

 

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.

 

 

DECLARE SUB OleUninitilize _
   LIB "OLE32.DLL" _
   ALIAS "OleUninitialize" ( _

)
 

 

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.

 

 

DECLARE FUNCTION RegisterDragDrop _
   LIB "OLE32.DLL" _
   ALIAS "RegisterDragDrop" ( _

   BYVAL hWnd AS DWORD, _

   BYVAL pDropTarget AS DWORD _

) AS LONG
 

 

ReleaseStgMedium

 

Frees the specified storage medium.

 

 

DECLARE SUB ReleaseStgMedium _
   LIB "OLE32.DLL" _
   ALIAS "ReleaseStgMedium" ( _

   BYVAL pmedium AS STGMEDIUM _

)
 

 

RevokeDragDrop

 

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

 

 

DECLARE FUNCTION RevokeDragDrop _
   LIB "OLE32.DLL" _
   ALIAS "RevokeDragDrop" ( _

   BYVAL hwnd AS DWORD _

) AS LONG
 

 

Page last updated on Wednesday, 30 August 2006 15:10:54 +0200