In delphi, if you want to create a COM object, you can do this in two ways:
first early binding for example
uses MSScriptControl_TLB; // MS Script Control var obj: IScriptControl; begin obj := CreateOleObject('ScriptControl') as IScriptControl; .. .. obj.ExecuteStatement('Msgbox 1') end;
Or you can do it like the following (last binding)
var obj: OleVariant; begin obj := CreateOleObject('ScriptControl') ; obj.ExecuteStatement('Msgbox 1'); end;
which one is better in terms of performance?
source share