Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.


Specifies a version-independent form of the ProgID.

[ vi_progid( 
) ];


The version-independent ProgID representing the object.

ProgIDs present a human-readable version of the class identifier (CLSID) used to identify COM/ActiveX objects.

The vi_progid C++ attribute lets you specify a version-independent ProgID for a COM object. A ProgID has the form name1.name2.version. A version-independent ProgID does not have a version. It is possible to specify both the progid and the vi_progid attributes on a coclass. If you do not specify vi_progid, the version-independent ProgID is the value specified by the progid attribute.

vi_progid implies the coclass attribute, that is, if you specify vi_progid, it is the same thing as specifying the coclass and vi_progid attributes.

The vi_progid attribute causes a class to be automatically registered under the specified name. The generated .idl file will not display the ProgID value.

In ATL projects, If the coclass attribute is also present, the specified ProgID is used by the GetVersionIndependentProgID function (inserted by the coclass attribute).

See the coclass example for a sample use of vi_progid.

Attribute Context

Applies to

class, struct



Required attributes


Invalid attributes


For more information about the attribute contexts, see Attribute Contexts.

Community Additions

© 2015 Microsoft