次の方法で共有


VersionIndependentProgID Registry Key (Compact 2013)

3/26/2014

The values associated with this key associate a ProgID with a CLSID. These values are used to determine the latest version of an object application. The named values are stored under the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\<VersionIndependentProgID> = <Vendor>.<Component>\CLSID = <CLSID>\CurVer = <ProgID>

The <Vendor>.<Component> value specifies the name of the latest version of the object application.

The <CLSID> value provides the CLSID of the newest installed version of the class.

The <ProgID> value specifies the <ProgID> of the newest installed version of the class.

The format or the <VersionIndependentProgID> is <Vendor>.<Component>, separated by periods, with no spaces, and no version number. The version-independent ProgID, like the ProgID, can be registered with a human readable name.

Applications must register a version-independent programmatic identifier under the VersionIndependentProgID key. The <VersionIndependentProgID> refers to the application's class, and does not change from version to version; instead it remains constant across all versions, for example, Microsoft Word Document. It is used with macro languages and refers to the currently installed version of the application's class. The <VersionIndependentProgID> must correspond to the name of the latest version of the object application.

The <VersionIndependentProgID> is used when, for example, a container application creates a chart or table with a toolbar button. In this situation the application can use the <VersionIndependentProgID> to determine the latest version of the needed object application.

The <VersionIndependentProgID> is stored and maintained solely by application code. When given the VersionIndependentProgID, the CLSIDFromProgID function returns the CLSID of the current version.

You can use CLSIDFromProgID and ProgIDFromCLSID to convert between these two representations.

You can use IOleObject::GetUserType or OleRegGetUserType to change the identifier to a displayable string.

If a custom handler is not used, the entry should be set to OLE32.DLL, as shown in the following example.

HKEY_-CLASSES_ROOT\CLSID\{00000402-0000-0000-C000-000000000046} 
\InprocHandler = ole32.dll 

In addition to the preceding registry entry, you should add the following corresponding entry under the CLSID key.

\CLSID
\<CLSID> = <human readable name>
\<VersionIndependentProgID> = human readable name 

See Also

Reference

COM and DCOM Registry Settings