阅读:1165回复:1
关于扩充替换buffer
我有点懒,分析了一些东西,出了几次蓝屏,我就来请教了 :P
系统是2000,我做的是一个过滤驱动程序,设置了一个回调函数,拿到了其它驱动程序送过来的一个buffer指针,我想在里面加一些东西,那位大侠有高招,指点小弟一下,谢谢了先 |
|
|
沙发#
发布于:2003-08-19 08:50
这是我的源代码:
NTSTATUS OurClientEventReceive( IN PVOID TdiEventContext, IN CONNECTION_CONTEXT ConnectionContext, IN ULONG ReceiveDatagramFlags, IN ULONG BytesIndicated, IN ULONG BytesAvailable, OUT ULONG *BytesTaken, IN PVOID Tsdu, OUT PIRP *IoRequestPacket) { NTSTATUS stats; char* szDataBuffer = NULL; char* szFind = NULL; char* szChanged = NULL; char* szAdd = NULL; ULONG uLength = 0; KIRQL irql; // _asm int 3; //这地方我想对TSDU中数据进行添加 DbgPrint(\"OurClientEventReceive I bu pa lan ping:%s\\n\",Tsdu); } } stats = ((PTDI_IND_RECEIVE)(eventContext.old_handler))( eventContext.old_context, ConnectionContext, ReceiveDatagramFlags, BytesIndicated, BytesAvailable, BytesTaken, Tsdu, // pointer describing this TSDU, typically a lump of bytes IoRequestPacket // TdiReceive IRP if MORE_PROCESSING_REQUIRED. ); return stats; } |
|
|