Click here to Skip to main content
15,911,030 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?

Thank's
Posted

1 solution

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("http://mysite.com");
            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);
            PostData.Close();
            // 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");
        }
    }



http://stackoverflow.com/questions/8588808/next-steps-debugging-crash-in-customer-environment[^]
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900