Enables specification of a default value for a typed optional parameter.
Parameter.
The expression value resolves to a constant that can be described in a variant. The ODL already allows some expression forms, as when a constant is declared in a module. The same expressions are supported without modification.
The following example shows some legal parameter descriptions:
interface IFoo
{
void Ex1([defaultvalue(44)] LONG i);
void Ex2([defaultvalue(44)] SHORT i);
void Ex3([defaultvalue("Hello")] BSTR i);
}
The following rules apply:
None
interface QueryDef
{
// Type is now known to be a LONG type (good for browser in VBA and
// for a C/C++ programmer) and also has a default value of
// dbOpenTable (constant).
HRESULT OpenRecordset( [in, defaultvalue(dbOpenTable)]
LONG Type,
[out,retval]
Recordset **pprst);
}