You can make HTTP request directly from your BHO code. Check this article for code samples
How to Call localhost service from ATL VC++ BHO
Question
From ATL VC++ BHO i want to call http://localhost:8888
with some post data and receive data back from it. Basically IE extension would need to call HTTP POST request. From BHO code if I inject javascript and there add AJax post call this is not allowed because of cross site restrictions. Any suggestions on this ?
La solution 2
Autres conseils
Thanks,
Following code works for C# BHO :-
using (var wb = new WebClient())
{
var data = new NameValueCollection();
data["user"] = "D";
data["id"] = "E";
data["token"] = "token";
var response = wb.UploadValues("http://localhost:8888", "POST", data);
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow