zoukankan      html  css  js  c++  java
  • delphi webbrowser 跨域访问

    procedure IterateFrames(const AWB: IWebBrowser2);
    var
    Doc: IHTMLDocument2;
    Container: IOleContainer;
    Enumerator: ActiveX.IEnumUnknown;
    Unknown: IUnknown;
    Browser: IWebBrowser2;
    Fetched: Longint;
    NewDoc: IHTMLDocument2;
    begin
    if (Assigned(AWB.Document)) and (Supports(AWB.Document, IHTMLDocument2, Doc)) then
    begin
    // Recursive searching.
    // ACHTUNG! We cannot use the document's frames collection here, because
    // it does not work in every case (i.e. Documents from a foreign domain).
    // From: support.microsoft.com/support/kb/articles/Q196/3/40.ASP
    if (Supports(Doc, IOleContainer, Container)) and (Container.EnumObjects(OLECONTF_EMBEDDINGS, Enumerator) = S_OK) then
    begin
    while Enumerator.Next(1, Unknown, @Fetched) = S_OK do
    if (Supports(Unknown, IWebBrowser2, Browser)) and (Supports(Browser.Document, IHTMLDocument2, NewDoc)) then
    begin
    //DoSomethingWithNewDoc;
    IterateFrames(AWB);
    end;
    end;
    end;
    end;

  • 相关阅读:
    Sigmoid函数
    Softmax分类器
    正则化惩罚项
    损失函数
    交叉验证
    超参数
    IMAGENET
    hdu 2767 Proving Equivalences 强连通
    hdu 4587 TWO NODES 关节点
    hdu 3635 Dragon Balls 并查集
  • 原文地址:https://www.cnblogs.com/honeynm/p/4653651.html
Copyright © 2011-2022 走看看