Skip to content

Latest commit

 

History

History
124 lines (96 loc) · 3.77 KB

nf-ole2-olecreatelinktofile.md

File metadata and controls

124 lines (96 loc) · 3.77 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:ole2.OleCreateLinkToFile
OleCreateLinkToFile function (ole2.h)
Creates an object that is linked to a file.
OleCreateLinkToFile
OleCreateLinkToFile function [COM]
_ole_OleCreateLinkToFile
com.olecreatelinktofile
ole2/OleCreateLinkToFile
com\olecreatelinktofile.htm
com
06b013db-0554-4dbc-b19d-28314fb4fee0
12/05/2018
OleCreateLinkToFile, OleCreateLinkToFile function [COM], _ole_OleCreateLinkToFile, com.olecreatelinktofile, ole2/OleCreateLinkToFile
ole2.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
Ole32.lib
Ole32.dll
Windows
19H1
OleCreateLinkToFile
ole2/OleCreateLinkToFile
c++
APIRef
kbSyntax
DllExport
Ole32.dll
OleCreateLinkToFile

OleCreateLinkToFile function

-description

Creates an object that is linked to a file.

-parameters

-param lpszFileName [in]

Pointer to a string naming the source file to be linked to.

-param riid [in]

Reference to the identifier of the interface the caller later uses to communicate with the new object (usually IID_IOleObject, defined in the OLE headers as the interface identifier for IOleObject).

-param renderopt [in]

Value from the enumeration OLERENDER that indicates the locally cached drawing or data-retrieval capabilities the newly created object is to have. Additional considerations are described in the following Remarks section.

-param lpFormatEtc [in]

Pointer to a value from the enumeration OLERENDER that indicates the locally cached drawing or data-retrieval capabilities the newly created object is to have. The OLERENDER value chosen affects the possible values for the pFormatEtc parameter.

-param pClientSite [in]

Pointer to an instance of IOleClientSite, the primary interface through which the object will request services from its container. This parameter can be NULL.

-param pStg [in]

Pointer to the IStorage interface on the storage object. This parameter cannot be NULL.

-param ppvObj [out]

Address of pointer variable that receives the interface pointer requested in riid. Upon successful return, *ppvObj contains the requested interface pointer on the newly created object.

-returns

This function returns S_OK on success. Other possible values include the following.

Return code Description
STG_E_FILENOTFOUND
The file name is invalid.
OLE_E_CANT_BINDTOSOURCE
Not able to bind to source.

-remarks

The OleCreateLinkToFile function differs from the OleCreateLink function because it can create links both to files that are not aware of OLE, as well as to those that are using the Windows Packager.

-see-also

OleCreateLink