Tsdu Buffer and Internet Explorer Problem...

Hi All,

Currently in My Tdi Filter driver i am filtering the clients event handlers in traditional way by replacing them with my own handler and calling the original in my handler every thing is working fine.

Currently i want to modify/replace the received buffer in ClientEventReceive Handler.I just allocated my own buffer in which i copy the original incoming buffer from TDI then either i modify it or replace it with my own and then send new buffer to the original Client Handler .But strange enough the Tdi client app (internet expolrer ) does not recieves My Buffer , it receives original buffer and shows the original content.Why this is happening could you pls shed some light on this issue ? BTW i always clear all the cache for IE but still the problem persists.

MYPAGE is just a #define to
#define MYPAGE "

Controlled Access To Page…:slight_smile: " which i want to display in the browser when i found some tag inside the incoming HTTP response.

Here is what i am trying to do in My ClientEventReceiveHandler -

DbgPrint(“Allocating MyPage\n”);

pChar = ExAllocatePool(NonPagedPool,MyPageLen);

// Works on Dispatch Level with Non Paged Memory
RtlCopyMemory(pChar,MyPage,MyPageLen);

status = ((PTDI_IND_RECEIVE)pTdiRequestKernelSetEvent->EventHandler)(
// Original Event Context
pTdiRequestKernelSetEvent->EventContext,
ConnectionContext,
ReceiveFlags,
MyPageLen, //New Bytes Indicated,
BytesAvailable,
BytesTaken,
pChar, //New Tsdu Buffer
IoRequestPacket
);

But still the Internet explorer shows the page for which it was directed by the user Not MYPAGE… where i am wrong here ?

If i replace BytesIndicated with 0 and Tsdu parameter with NULL it generates an IRQL_NOT_LESS_THAN_EQUAL bug check.if i put my own buffer it is not received by the client application.(:

I have seen that Internet explorer submitts the TDI_RECEIVE Irp , i tried to hook its completion routine to change the buffer but that completion in not being called at all…First time IE displays the page for which URL was entered but next when i press refresh it starts displaying Page not Found…
Could Any one describe what exactly happening here…

Regards…
Subodh