
IDL Syntax
[attribute, …] statement name [:BaseInterfaceName]
{
[attribute, …] statementBlock;
};
attribute
1. Endpoint
specifies a “well-known” port on which servers of the interface listen
2. Helpstring
human readable comment string, e.g., helpstring(“this is a help string”)
3. Local
generate header files only – stubs are not generated
4. Object
identifies a custom COM interface – must be followed by a uuid
5. pointer_default
pointer attribute to be applied to an unattributed pointer specification
ptr full pointer functionality
ref a reference, never null, always points to valid storage, can
not be reset
unique can be null and can be reset, but can not be used as aliases,
e.g., data referenced by the pointer is unique to the pointer
6. uuid
text representation of a universally unique identifier
7. version
specifies version of the interface, e.g., version(1.1)
statement name:
1. coclass
specify a list of intefaces supported by a COM component
2. dispinterface
generate an interface derived from idispatch, used for automation
3. interface
used to generate a COM interface
4. library
generate a type library from the statement block
5. module
defines a set of functions when generating a DLL
6. enum, typedef, struct, union
C-like language declarations, used to describe interface parameters