阅读:1986回复:1
【急】菜鸟向大侠请教:IoCallDriver返回值总是NT_STATUS_CONNECTION_REFUSED
各位大侠好,最近刚开始接触驱动
我在自己的驱动中间建一个irp,然后调用IoCallDriver,返回值总是NT_STATUS_CONNECTION_REFUSED 相关代码如下: deviceObject = GetDeviceObjectByName( "\\Device\\Tcp" ) ; if(deviceObject==NULL) { status = STATUS_INVALID_HANDLE ; return status ; } KeClearEvent(&Socket->Event); irp = rootkitTdiAllocIrp(Socket); if (irp != NULL) { irp->UserEvent = &Socket->Event; irp->UserIosb = &Socket->IoStatus; rootkitTdiAddRef(Socket); TdiBuildConnect( irp, deviceObject, Socket->ConnectionFileObject, rootkitTdiConnectComplete, Socket, NULL, RequestAddr, ReturnAddr ); status = IoCallDriver(deviceObject, irp); |
|
|
沙发#
发布于:2009-10-05 11:37
回 楼主(xiaolajiao) 的帖子
问题已解决:是传给底层驱动的端口设置问题,没有将他转换为网络字节顺序 |
|
|