如何将请求发送到堆栈中的下一个驱动程序以进一步完成?
在我的过滤器驱动程序中,我使用回调 EvtDeviceIoWrite 为 EventWrite 注册了一个队列,如下所示:
VOID
EvtDeviceIoWrite(
IN WDFQUEUE Queue,
IN WDFREQUEST Request,
IN size_t Length
)
{
WDFMEMORY memory;
NTSTATUS status;
PUCHAR characters;
UCHAR currentChar;
UNREFERENCED_PARAMETER(Queue);
status = WdfRequestRetrieveInputMemory(Request, &memory);
if (!NT_SUCCESS(status)) {
KdPrint(("RetreiveInputMemo: failed 0x%x\n", status));
return;
}
characters = (PUCHAR)WdfMemoryGetBuffer(memory, NULL);
while (Length != 0) {
Length--;
currentChar = *(characters++);
// Here I would like to edit the buffer
// copy it to output buffer WdfMemoryCopyFromBuffer
}
**// what should be here for send**
}
我只想做这样的事情,但为了请求。
抱歉,我是内核开发的新手,如果有人能指出实现这一目标的正确方法,那将是非常棒的。任何建议将不胜感激。