function TfrmBrowser.OnGetExternal(out ppDispatch: IDispatch): HRESULT;
var
FIntf: TWebBrowserEvent;
begin
FIntf := TWebBrowserEvent.Create;
ppDispatch := FIntf;
Result := S_OK;
end;
...
/// Com Object
uses
ComObj, ActiveX, BrowserEx_TLB, StdVcl;
type
TWebBrowserEvent = class(TAutoObject, ISomeIntface)
protected
procedure Test; safecall;
function Get_GetMacAddr: OleVariant; safecall;
// do something, implement ISomeIntface
end