Click here to Skip to main content
12,756,882 members (36,318 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#
please somebody help,,

is it possible to run multiple BHO in same time?
in this case,

i have to generate 2 BHO (2 add-ons) with different name,

but when i opened IE ,
the 1st BHO running well,but
the 2nd BHO is not running,

have somebody solution for this case?

Posted 15-Jan-13 18:49pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

public class BHO:IObjectWithSite
    WebBrowser webBrowser;
    HTMLDocument document;
    public void OnDocumentComplete(object pDisp, ref object URL)
        document = (HTMLDocument)webBrowser.Document;
        string href = document.location.href;
        //get top level page
        if (href == URL.ToString())
            HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create("");
            WebReq.Method = "POST";
            WebReq.ContentType = "application/x-www-form-urlencoded";
            byte[] buffer = Encoding.ASCII.GetBytes("string");
            WebReq.ContentLength = buffer.Length;
            Stream PostData = WebReq.GetRequestStream();
            PostData.Write(buffer, 0, buffer.Length);
            // Prepare web request and send the data.
            HttpWebResponse WebResp = (HttpWebResponse)WebReq.GetResponse();
            StreamReader streamResponse = new StreamReader(WebResp.GetResponseStream(), true);
            string Response = streamResponse.ReadToEnd();
            Newtonsoft.Json.Linq.JObject json = Newtonsoft.Json.Linq.JObject.Parse(Response);
            string active = json["active"].ToString();
            //print to screen
            System.Windows.Forms.MessageBox.Show(active, "Title");

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 15 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100