Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 1.6 KB

appobject.md

File metadata and controls

57 lines (42 loc) · 1.6 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: appobject
appobject (C++ COM Attribute)
10/02/2018
vc-attr.appobject
appobject attribute
8ce30b73-e945-403e-a755-6bc78078a695

appobject

Identifies the coclass as an application object, which is associated with a full .exe application, and indicates that the functions and properties of the coclass are globally available in this type library.

Syntax

[appobject]

Remarks

The appobject C++ attribute has the same functionality as the appobject MIDL attribute.

Example

The following code shows a simple class definition preceded by an attribute block that includes appobject:

// cpp_attr_ref_appobject.cpp
// compile with: /LD
#include <windows.h>
[module(name="MyLib", uuid="f1ce17f0-a5df-4d26-95f6-0a122197ac5b")];

[object, uuid="905de6db-7a12-45ab-9f8b-b39f5112f010"]
__interface ICustom {};

[coclass, appobject,uuid="00395340-745f-4b69-bd58-e2921452b9fc"]
class A : public ICustom {
   int i;
};

Requirements

Attribute context Value
Applies to class, struct
Repeatable No
Required attributes coclass
Invalid attributes None

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

See also

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