restricted attribute
The [restricted] attribute specifies that a library, or member of a module, interface, or dispinterface cannot be called arbitrarily.
[
restricted
[, other-attributes]
]
statement-type statement-name
{
definitions
};
-
other-attributes
-
Zero or more MIDL attributes.
-
statement-type
-
One of the following: library, module, interface, dispinterface.
-
statement-name
-
The identifier by which the software refers to this statement.
-
definitions
-
MIDL language elements that define the contents of this statement.
This attribute enables you to control access to elements of interfaces, libraries, modules, and dispinterfaces. For example, it can prevent a data item from being used by a macro programmer. You can apply this attribute to a member of a coclass, independent of whether the member is a dispinterface or interface, and independent of whether the member is a sink (incoming) or source (outgoing). A member of a coclass cannot have both the [restricted] and [default] attributes.
IMPLTYPEFLAG_FRESTRICTED, FUNCFLAG_FRESTRICTED
[
uuid(12345678-1234-1234-1234-123456789ABC),
version (1.0),
restricted
]
library MyLibrary
{
// Library definition statements.
};
[propget, restricted] HRESULT MyProc(void);