-> Zoran : This is not my case, because the default value is declared at interface. And the implementation repeats exactly the interface.
-> Jonas Maebe
The default value is Nil, that should be compatible with a COM object. There is also a second error:
- Incompatible types: got "Pointer" expected "Variant"
Taking account of your message, I changed the declaration to
NOT have a default value. Same declaration at implementation.
function runScript(const scriptName: WideString; const argsList: array of Variant;
const language: WideString = 'Basic'; const location: WideString = 'user';
const doc: Variant): Variant;
It still throws one error at the interface declaration:
- Default parameter required for "DOC"
This is bewildering because some lines before, this function is accepted by the compiler:
function MakePropertyValue(const PropName: WideString; const PropValue: Variant): Variant;