Package org.eclipse.swt.internal.ole.win32

Examples of org.eclipse.swt.internal.ole.win32.GUID


  /**
   * Injects an object into the Browser class that resolves to IE's 'window.external' object.
   */
  public static void injectBrowserScriptExternalObject(Browser browser, final IDispatchImpl external) {
    COMObject iDocHostUIHandler = getDocHostUIHandler(browser);
    // Create a COMObjectProxy that will override GetExternal().
    //
    COMObjectProxy webSiteProxy =
        new COMObjectProxy(new int[]{2, 0, 0, 4, 1, 5, 0, 0, 1, 1, 1, 3, 3, 2, 2, 1, 3, 2}) {
          {
View Full Code Here


    //
    webSiteProxy.interpose(iDocHostUIHandler);
  }

  public static void ejectBrowserScriptExternalObject(Browser browser) {
    COMObject iDocHostUIHandler = getDocHostUIHandler(browser);
    COMObjectProxy.setCOMObject(iDocHostUIHandler.getAddress(), iDocHostUIHandler);
  }
View Full Code Here

    // Hang onto the object we're wrapping so that we can delegate later.
    this.target = victim;
    // Get the COMObject ObjectMap so that we can hijack the target's slot.
    // First, make sure that the target is still actually in the map.
    // If it isn't still in there, then the caller is using me incorrectly.
    COMObject currValue = getCOMObject(target.getAddress());
    if (currValue != target) {
      throw new IllegalStateException("target object is not currently mapped");
    }
    // Replace target's entry in COMObject's (vtbl -> instance) map with
    // a reference to this object instead. Calls still come in on the
View Full Code Here

  public static void injectBrowserScriptExternalObject(Browser browser,
      final IDispatchImpl external) {
    // Grab the browser's 'site.iDocHostUIHandler' field.
    //
    Object webSite = LowLevel.snatchFieldObjectValue(browser, "site");
    COMObject iDocHostUIHandler = (COMObject) LowLevel.snatchFieldObjectValue(
        webSite, "iDocHostUIHandler");

    // Create a COMObjectProxy that will override GetExternal().
    //
    COMObjectProxy webSiteProxy = new COMObjectProxy(new int[] {
View Full Code Here

  public static void injectBrowserScriptExternalObject(Browser browser,
      final IDispatchImpl external) {
    // Grab the browser's 'site.iDocHostUIHandler' field.
    //
    Object webSite = LowLevel.snatchFieldObjectValue(browser, "site");
    COMObject iDocHostUIHandler = (COMObject) LowLevel.snatchFieldObjectValue(
        webSite, "iDocHostUIHandler");

    // Create a COMObjectProxy that will override GetExternal().
    //
    COMObjectProxy webSiteProxy = new COMObjectProxy(new int[] {
View Full Code Here

        COMObject.class, null, "ObjectMap");
    Integer ppVtableTarget = new Integer(target.getAddress());

    // First, make sure that the target is still actually in the map.
    // If it isn't still in there, then the caller is using me incorrectly.
    COMObject currValue = objectMap.get(ppVtableTarget);
    if (currValue != target) {
      throw new IllegalStateException("target object is not currently mapped");
    }

    // Replace target's entry in COMObject's (vtbl -> instance) map with
View Full Code Here

   * Injects an object into the Browser class that resolves to IE's
   * 'window.external' object.
   */
  public static void injectBrowserScriptExternalObject(Browser browser,
      final IDispatchImpl external) {
    COMObject iDocHostUIHandler = getDocHostUIHandler(browser);

    // Create a COMObjectProxy that will override GetExternal().
    //
    COMObjectProxy webSiteProxy = new COMObjectProxy(new int[] {
        2, 0, 0, 4, 1, 5, 0, 0, 1, 1, 1, 3, 3, 2, 2, 1, 3, 2}) {
View Full Code Here

    //
    webSiteProxy.interpose(iDocHostUIHandler);
  }

  public static void ejectBrowserScriptExternalObject(Browser browser) {
  COMObject iDocHostUIHandler = getDocHostUIHandler(browser);
    COMObjectProxy.setCOMObject(iDocHostUIHandler.getAddress(), iDocHostUIHandler);
  }
View Full Code Here

    this.target = victim;

    // Get the COMObject ObjectMap so that we can hijack the target's slot.
    // First, make sure that the target is still actually in the map.
    // If it isn't still in there, then the caller is using me incorrectly.
    COMObject currValue = getCOMObject(target.getAddress());
    if (currValue != target) {
      throw new IllegalStateException("target object is not currently mapped");
    }
    // Replace target's entry in COMObject's (vtbl -> instance) map with
    // a reference to this object instead. Calls still come in on the
View Full Code Here

   */
  protected abstract Variant invoke(int dispId, int flags, Variant[] params)
      throws HResultException, InstantiationException, InvocationTargetException;

  private Variant[] extractVariantArrayFromDispParamsPtr(int pDispParams) {
    DISPPARAMS dispParams = new DISPPARAMS();
    COM.MoveMemory(dispParams, pDispParams, DISPPARAMS.sizeof);
    Variant[] variants = new Variant[dispParams.cArgs];
    // Reverse the order as we pull the variants in.
    for (int i = 0, n = dispParams.cArgs; i < n; ++i) {
      int varArgAddr = dispParams.rgvarg + Variant.sizeof * i;
 
View Full Code Here

TOP

Related Classes of org.eclipse.swt.internal.ole.win32.GUID

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.