Skip to content

Latest commit

 

History

History
145 lines (116 loc) · 4.49 KB

nf-ole2-olegetautoconvert.md

File metadata and controls

145 lines (116 loc) · 4.49 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 req.apiset
NF:ole2.OleGetAutoConvert
OleGetAutoConvert function (ole2.h)
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.
OleGetAutoConvert
OleGetAutoConvert function [COM]
_com_OleGetAutoConvert
com.olegetautoconvert
ole2/OleGetAutoConvert
com\olegetautoconvert.htm
com
f84e578a-d2ed-4b7b-9b7c-5d63f12d5781
12/05/2018
OleGetAutoConvert, OleGetAutoConvert function [COM], _com_OleGetAutoConvert, com.olegetautoconvert, ole2/OleGetAutoConvert
ole2.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
Ole32.lib
Ole32.dll
Windows
19H1
OleGetAutoConvert
ole2/OleGetAutoConvert
c++
APIRef
kbSyntax
DllExport
Ole32.dll
Ext-MS-Win-COM-OLE32-l1-1-0.dll
Ext-MS-Win-COM-OLE32-l1-1-1.dll
Ext-MS-Win-COM-OLE32-l1-1-2.dll
ext-ms-win-com-ole32-l1-1-3.dll
Ext-MS-Win-Com-Ole32-L1-1-4.dll
OleGetAutoConvert
ext-ms-win-com-ole32-l1-1-0 (introduced in Windows 8)

OleGetAutoConvert function

-description

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.

-parameters

-param clsidOld [in]

The CLSID for the object.

-param pClsidNew [out]

A pointer to a variable to receive the new CLSID, if any. If auto-conversion for clsidOld is not set in the registry, clsidOld is returned. The pClsidNew parameter is never NULL.

-returns

This function can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following values.

Return code Description
S_OK
A value was successfully returned through the pclsidNew parameter.
REGDB_E_CLASSNOTREG
The CLSID is not properly registered in the registry.
REGDB_E_READREGDB
Error reading from the registry.
REGDB_E_KEYMISSING
Auto-convert is not active or there was no registry entry for the clsidOld parameter.

-remarks

OleGetAutoConvert returns the AutoConvertTo entry in the registry for the specified object. The AutoConvertTo subkey specifies whether objects of a given CLSID are to be automatically converted to a new CLSID. This is usually used to convert files created by older versions of an application to the current version. If there is no AutoConvertTo entry, this function returns the value of clsidOld.

The OleDoAutoConvert function calls OleGetAutoConvert to determine whether the object specified is to be converted. A container application that supports object conversion should call OleDoAutoConvert each time it loads an object. If the container uses the OleLoad helper function, it need not call OleDoAutoConvert explicitly because OleLoad calls it internally.

To set up automatic conversion of a given class, you can call the OleSetAutoConvert function (typically in the setup program of an application installation). This function uses the AutoConvertTo subkey to tag a class of objects for automatic conversion to a different class of objects. This is a subkey of the CLSID key.

-see-also

AutoConvertTo

OleDoAutoConvert

OleSetAutoConvert