interface[@|#] typename :baseinterface memberfunctions [{guid}]
typename - interface name.
baseinterface - interface from which this interface is inherited.
memberfunctions - list of member functions.
guid - GUID of the interface. It is implicitly used by _create and in some other cases.
@ | Declare dispinterface.
|
# | All functions are Automation-compatible.
|
Member function syntax:
[[attributes]][membertype]membername[(parameters)]
attributes - one or more of the following literals:
f | method (default). |
p | property-put function. |
g | property-get function. |
r | property-put byref function. |
h | function is Automation-compatible.
|
a | function is Automation-compatible. It has a hidden parameter for return value (not specified in parameters).
|
l | function is Automation-compatible. It has a hidden parameter for locale (not specified in parameters).
|
membertype - type of the return value.
membername - function's name.
parameters - parameters. Same as with dll. Parentheses (maybe empty) must be used, unless parameters are not defined.
See also: declarations, scope
Declares a COM interface. A COM interface defines functions that can be used with a COM object. Read more.
Interfaces also can be declared in reference files and type libraries, which allows you to use them without declaring explicitly. Many declarations are in WINAPI and WINAPIV reference files. Usage example:
WINAPI.ITaskScheduler ts
QM 2.3.0: Can be defined optional parameters, like with dll.
QM 2.3.0. Allowed comments, like with type.
QM 2.4.1. You can declare parameters as reference instead of pointer. For example, VARIANT&p is the same as VARIANT*p.
interface IDispatch :IUnknown #GetTypeInfoCount(*pctinfo) #GetTypeInfo(iTInfo lcid ITypeInfo*pTInfo) #GetIDsOfNames(GUID*riid word**rgszNames cNames lcid rgDispId) #Invoke(dispIdMember GUID*riid lcid @wFlags DISPPARAMS*pDispParams VARIANT*pVarResult EXCEPINFO*pExcepInfo *puArgErr) {00020400-0000-0000-C000-000000000046} interface IAccessible :IDispatch [ga]IAccessible'Parent() [ga]ChildCount() [ga]IAccessible'Child(VARIANT'varChild) [ga]BSTR'Name(VARIANT'varChild) [ga]BSTR'Value(VARIANT'varChild) [ga]BSTR'Description(VARIANT'varChild) [ga]VARIANT'Role(VARIANT'varChild) [ga]VARIANT'State(VARIANT'varChild) [ga]BSTR'Help(VARIANT'varChild) [ga]HelpTopic(BSTR*pszHelpFile VARIANT'varChild) [ga]BSTR'KeyboardShortcut(VARIANT'varChild) [ga]VARIANT'Focus() [ga]VARIANT'Selection() [ga]BSTR'DefaultAction(VARIANT'varChild) [h]Select(flagsSelect VARIANT'varChild) [h]Location(*pxLeft *pyTop *pcxWidth *pcyHeight VARIANT'varChild) [a]VARIANT'Navigate(navDir VARIANT'varStart) [a]VARIANT'HitTest(xLeft yTop) [h]DoDefaultAction(VARIANT'varChild) [ph]Name(VARIANT'varChild BSTR'szName) [ph]Value(VARIANT'varChild BSTR'szValue) {618736e0-3c3d-11cf-810c-00aa00389b71} interface# ITask :IScheduledWorkItem SetApplicationName(@*pwszApplicationName) GetApplicationName(@**ppwszApplicationName) SetParameters(@*pwszParameters) GetParameters(@**ppwszParameters) SetWorkingDirectory(@*pwszWorkingDirectory) GetWorkingDirectory(@**ppwszWorkingDirectory) SetPriority(dwPriority) GetPriority(*pdwPriority) SetTaskFlags(dwFlags) GetTaskFlags(*pdwFlags) SetMaxRunTime(dwMaxRunTimeMS) GetMaxRunTime(*pdwMaxRunTimeMS) {148BD524-A2AB-11CE-B11F-00AA00530503} interface@ IExample :IDispatch #Method(VARIANT'v) [g]BSTR'Property() [p]Property(BSTR'name)