title | description | ms.assetid | keywords | topic_type | api_name | api_type | ms.topic | ms.date | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
source attribute |
The \ source\ attribute indicates that a member of a coclass, property, or method is a source of events. For a member of a coclass, this attribute means that the member is called rather than implemented. |
fbd5411a-e614-4643-810a-f3765e7ec16d |
|
|
|
|
reference |
05/31/2018 |
The [source] attribute indicates that a member of a coclass, property, or method is a source of events. For a member of a coclass, this attribute means that the member is called rather than implemented.
[
coclass-attributes
]
coclass coclass-name
{
[source [, optional-attributes] ] statement-type statement-name;
[, ...]
}
[source] object-type function-name(optional-parameter-list);
-
coclass-attributes
-
Zero or more attributes that will be applied to the coclass.
-
coclass-name
-
The name identifier of the coclass.
-
optional-attributes
-
Zero or more MIDL attributes.
-
statement-type
-
Can be interface or dispinterface.
-
statement-name
-
The name of the interface or dispinterface.
-
object-type
-
The type of the object that the method returns. This object is a source of events.
-
function-name
-
The name of a method in an interface or dispinterface.
-
optional-parameter-list
-
Zero or more method parameters.
On a property or method, the [source] attribute indicates that the member returns an object or VARIANT that is a source of events. The object implements IConnectionPointContainer.
IMPLTYPEFLAG_FSOURCE, VARFLAG_SOURCE, FUNCFLAG_SOURCE
[default, source] dispinterface DIMyFaceAdviseSink;
[source]interface IMyFaceAdviseSink;