Hi,
I'm developing a TDI filter and I have this problem.
Sometime my filter crash in AFD.SYS when I call my function for send the at
callback ClientEventReceive that I hooked.
I read 8192 byte at once from a file and after call the old callback of
ClientEventReceive that I hooked.
Not always crash... sometime in the first call of my cycle.
This is my code:
ReceiveFlags = TDI_RECEIVE_ENTIRE_MESSAGE;
dwBytesRead = 1;
while (dwBytesRead != 0) {
ReadFile (hFile, (PVOID) &Message, 8192, &dwBytesRead, NULL);
if (dwBytesRead != 0) {
KeRaiseIrql ( DISPATCH_LEVEL, &oldirql);
ntStatus = ((PTDI_IND_RECEIVE) (ER_DinCallbackEvent)) (
(PVOID) ER_EVENTCONTEXT,
(CONNECTION_CONTEXT) ER_CONNECTIONCONTEXT,
ReceiveFlags,
dwBytesRead, //BytesIndicated
dwBytesRead, //BytesAvailable,
&TAKEN, //BytesTaken,
(PVOID)&Message, //Tsdu,
&IoRequestPacket);
KeLowerIrql (oldirql);
}
}
Do you know some bug in AFD.SYS ?
Best Regards
Gianfranco Tonello