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.
[ coclass-attributes ] coclass coclass-name { [source [, optional-attributes] ] statement-type statement-name; [, ...] } [source] object-type function-name(optional-parameter-list);
Parameters
- 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.
Remarks
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.
Flags
IMPLTYPEFLAG_FSOURCE, VARFLAG_SOURCE, FUNCFLAG_SOURCE
Examples
[default, source] dispinterface DIMyFaceAdviseSink; [source]interface IMyFaceAdviseSink;
See also
- coclass
- dispinterface
- Generating a Type Library With MIDL
- interface
- ODL File Example
- ODL File Syntax
- TYPEFLAGS