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.
WINOLEAPI OleGetAutoConvert(
REFCLSID clsidOld, |
//CLSID of the object to be converted |
LPCLSID pClsidNew |
//Pointer to new CLSID for object being converted |
); |
|
Parameters
clsidOld
[in] CLSID
for an object to determine whether that CLSID is set for automatic conversion.
pClsidNew
[out] Pointrt
to where the new CLSID, if any, is written. If auto-conversion for clsidOld
is not set in the registry, clsidOld is written to that location. The pClsidNew
parameter is never NULL.
Return Values
This function
supports the standard return values E_INVALIDARG, E_OUTOFMEMORY, and
E_UNEXPECTED, as well as the following:
S_OK
IA value was
successfully returned through the pclsidNew parameter.
REGDB_E_CLASSNOTREG
The clsidOld
CLSID is not properly registered in the registry.
REGDB_E_READREGDB
Error reading
the registry.
REGDB_E_KEYMISSING
Auto-convert
is not active or there was no registry entry for the clsidOld parameter.
Remarks
The OleGetAutoConvert
function 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
To set up
automatic conversion of a given class, you can call the OleSetAutoConvert
CLSID\{ clsid}=MainUserTypeName\AutoConvertTo
= clsid
See Also