troubleshooting Question

ISAPI Filter WriteClient

Avatar of aponcealbuerne
aponcealbuerne asked on
System Programming
13 Comments1 Solution831 ViewsLast Modified:
I'm trying to replace the response that the web server (IIS) sends to a client via an ISAPI Filter.

I built using Visual Studio 2003. I built it with the ISAPI Extension Wizard (making it with filter options).

The problem here is that every time the browser ask for the htm page, the browser gets the the contents of the original htm page. But what i want is to change that content to some other content. So the WriteClient function seems to do nothing. How should i do this???

Here's part of my code.

DWORD CCodeHiderFilter::OnSendResponse(CHttpFilterContext* pfc, PHTTP_FILTER_SEND_RESPONSE pSendResponse)
      char strMensaje[40];
    DWORD dwCont;
      dwCont = (DWORD)strlen(strMensaje);
      if(pfc->WriteClient(strMensaje, &dwCont) == 0)
      // TODO: React to this notification accordingly and
      // return the appropriate status code

Thanks in advance
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 13 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros