Home › Forums › Discussions › General › Failure to receive data TDI connection endpoint. Please help › Reply To: Failure to receive data TDI connection endpoint. Please help
I think problem is your routine Recv does nit work at all
KeWaitForSingleObject(&Event, UserRequest,
KernelMode, FALSE, 0); dont wait (timeout == 0!!!!), your check
if(!NT_SUCCESS(status)) dont work
see declaration:
#define NT_SUCCESS(Status) ((NTSTATUS)(Status) >= 0)
and
STATUS_TIMEOUT ((DWORD )0x00000102L)
that is your IRP was not handled
Your debug out is content of uninitialized IoStatus struct and may be different.
Solve problem:
Your Recv never will work because you have registerd your Receive Event Handler. You should replace your code from Recv to EventReceive. But you should note, that EventReceive works at IRQL = DISPATCH_LEVEL