BHO an redirecting with it in C#

S

shoniko

Hi! I've implemented BHO and what I need is for it to redirect some
urls t anther one's.
But when I change the data in BeforeNavigate2 methd - the IE ignores
it.
When I tried to call Navigate2 method from BeforeNaviget2 - it did
redirecting, but didn't catch the POST data (which is strange I
think..).

So the code is:

private void BeforeNavigate2( object pDisp,
ref object urlObj,
ref object Flags,
ref object TargetFrameName,
ref object PostData,
ref object Headers,
ref bool Cancel )
{
//........ some code here
urlObj = urlToGo;
postString = postString.rimStart('&');
PostData = ASCIIEncoding.ASCII.GetBytes(postString);
Headers = "application/x-www-form-urlencoded" + "\r" + "\n";
}


thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top