I found some delphi code and try to translate it on autoit
source:
function CrossDomainFrame(Doc : IHTMLDocument2;nFrame : Integer) : IWebBrowser2;
var
theContainer : IOLEContainer;
Enumerator : IEnumUnknown;
nFetched : PLongInt;
unknownFrame : IUnknown;
begin
Result := nil;
nFetched := nil;
theContainer := Doc as IOleContainer;
theContainer.EnumObjects(OLECONTF_EMBEDDINGS, Enumerator);
Enumerator.skip(nFrame);
Enumerator.next(1, unknownFrame, nFetched);
unknownframe.QueryInterface(IID_IWebBrowser2, Result);
end;
but lack the knowledge, please help
I think you want to use ObjCreateInterface and obtain a pointer to IOleContainer