Skip to content

Latest commit

 

History

History
66 lines (51 loc) · 2.48 KB

File metadata and controls

66 lines (51 loc) · 2.48 KB
title vi_progid | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-windows
ms.tgt_pltfrm
ms.topic language-reference
f1_keywords
vc-attr.vi_progid
dev_langs
C++
helpviewer_keywords
vi_progid attribute
ms.assetid a52449be-b93e-4111-b883-44bb8da53261
caps.latest.revision 10
author mikeblome
ms.author mblome
manager ghogen

vi_progid

Specifies a version-independent form of the ProgID.

Syntax

  
      [ vi_progid(  
   name  
) ];  

Parameters

name
The version-independent ProgID representing the object.

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

Remarks

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).

Example

See the coclass example for a sample use of vi_progid.

Requirements

Attribute Context

Applies to class, struct
Repeatable No
Required attributes None
Invalid attributes None

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

See Also

IDL Attributes
Typedef, Enum, Union, and Struct Attributes
Class Attributes
ProgID Key