0

I'm trying to get the flash object with ShockwaveFlashObjects component. I get the browser object successfully, but I'm wondering how to get the Flash object through the browser object in IWebBrowser2 type. The code below shows the interface I defined. Has anyone some ideas for me? Thanks.

interface IGetObjects
{
    SHDocVw.IWebBrowser2 GetBrowserObject();
    ShockwaveFlashObjects.ShockwaveFlashClass GetFlashObject(IWebBrowser2 browserObject);
}

And this is the way, I get the browser object. #caution# Flash is used for test, so it is located in local.

public IWebBrowser2 GetBrowserObject()
{
    InternetExplorerClass browser = null;
    var shellWindows = new ShellWindowsClass();
    const string explorFullName = "C:\\Program Files (x86)\\Internet Explorer\\IEXPLORE.EXE";
    IWebBrowser2 iwb2 = null;

    for (int i = 0; i < shellWindows.Count; i++)
    {
        iwb2 = shellWindows.Item(i) as IWebBrowser2;
        if (iwb2 != null && Equals(iwb2.FullName , explorFullName))
        {
           break;
        }
    }

    return iwb2;
}

And now I have no idea how to completed the second method ShockwaveFlashClass GetFlashObject(IWebBrowser2 browserObject).

JimiLoe
  • 950
  • 2
  • 14
  • 22
luziqin
  • 51
  • 1
  • 9

0 Answers0