大网数据广告活动
Windows 系统接口

ProgID Key

· 52CE 我爱测

A programmatic identifier (ProgID) is a registry entry that can be associated with a CLSID. Like the CLSID, the ProgID identifies a class but with less precision because it is not guaranteed to be globally unique.

A programmatic identifier (ProgID) is a registry entry that can be associated with a CLSID. Like the CLSID, the ProgID identifies a class but with less precision because it is not guaranteed to be globally unique.

Registry Entry

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\{ProgID}

Registry key Description
CLSID Associates a ProgID with a CLSID.
Insertable Indicates that this class is insertable in OLE 2 containers.
Protocol Indicates that this OLE 2 class is insertable in OLE 1 containers.
Shell Provides Windows 3.1 shell printing and File Open information.

Remarks

You can use a ProgID in programming situations where it is not possible to use a CLSID. ProgIDs should not appear in the user interface. ProgIDs are not guaranteed to be unique, so they can be used only where name collisions are manageable.

The format of a ProgID is <Program>.<Component>.<Version>, separated by periods and with no spaces, as in Word.Document.6. The ProgID must comply with the following requirements:

  • Have no more than 39 characters.
  • Contain no punctuation (including underscores and slashes) except one or more periods.
  • Not start with a digit.
  • Be different from the class name of any OLE 1 application, including the OLE 1 version of the same application, if there is one.

Because the ProgID should not appear in the user interface, you can obtain a displayable name by calling IOleObject::GetUserType. Also, see OleRegGetUserType.

The HKEY_LOCAL_MACHINE\SOFTWARE\Classes key corresponds to the HKEY_CLASSES_ROOT key, which was retained for compatibility with earlier versions of COM.

Related topics

IOleObject::GetUserType

OleRegGetUserType

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。