|
[分享]debugman上不去~bin发这里玩玩
写一个串口驱动,人家刚刚打开一个串口,就弹出一个记事本,简直莫名,呵呵 |
|
[分享]debugman上不去~bin发这里玩玩
以后真的可以用驱动写一个记事本 |
|
[分享]debugman上不去~bin发这里玩玩
原来有源码啊,害我反出来一点成就感都没有 |
|
|
|
[注意]奇虎360软件安全大赛 获奖名单
公开答案让人学习下啊。 |
|
[结束]网络攻防007——奇虎360软件安全大赛
期待中。。。。 |
|
[原创]明明白白自旋锁
个人觉得写的还不赖 |
|
[求助]DDK编译问题
在你的代码里面搜索security_check_cookie,应该是没有实现部分 |
|
[求助]由IoSetCompletionRoutine源代码引出的两点迷惑
如果你的驱动程序不用关心IRP传递到下层驱动程序之后的事情,你可以利用一个捷径来避免复制堆栈单元。在这种情形下,我们不需要安装完成例程。 没有必要花费处理器时间去把你的堆栈单元内容复制到下一个堆栈单元,因为那个堆栈单元已经含有下一层驱动程序要得到的参数,以及自己上一层驱动程序可能给出的任何完成例程指针。因此,你可以使用下面捷径方法: NTSTATUS ForwardAndForget(PDEVICE_OBJECT fdo, PIRP Irp) { PDEVICE_EXTENSION pdx = (PDEVICE_EXTENSION) fdo->DeviceExtension; IoSkipCurrentIrpStackLocation(Irp); return IoCallDriver(pdx->LowerDeviceObject, Irp); } 这个捷径存在于IoSkipCurrentIrpStackLocation函数(它实际上是一个宏,名字有些另人误解)中。这个宏的作用就是使堆栈指针少前进一步,而IoCallDriver函数会使堆栈指针向前一步,中和的结果就是堆栈指针不变。当下一个驱动程序的派遣例程调用IoGetCurrentIrpStackLocation时,它将收到与我们正使用的完全相同的IO_STACK_LOCATION指针,因此,它所处理的将是同一个请求(相同的主副功能代码)以及相同的参数。 |
|
[注意]微软亚洲技术支持中心招聘
操作系统支持工程师是干啥的? =================== 我的理解是: 有老外不会用Windows,打电话过来寻求支持,你就告诉他怎么用。这里的【用】包括了一般使用和在Windows上编程,上海MS好像是亚太支持中心。 |
|
[求助]驱动无法卸载
这就对了,没有任何问题,驱动在被应用层加载打开设备后,这个应用层程序没有退出,就一直拥有这个句柄,即使你意外拔出了设备或者设备断电,驱动也要等待那个应用层程序退出再调用UnLoad。 |
|
[求助]由IoSetCompletionRoutine源代码引出的两点迷惑
IoSkipCurrentIrpStackLocation是将这个指针移回来,实现平衡。 |
|
[求助]由IoSetCompletionRoutine源代码引出的两点迷惑
重新看了IoCallDriver的源码学习理解如下: NTSTATUS FASTCALL IopfCallDriver( IN PDEVICE_OBJECT DeviceObject, IN OUT PIRP Irp ) { PIO_STACK_LOCATION irpSp; PDRIVER_OBJECT driverObject; NTSTATUS status; // // Ensure that this is really an I/O Request Packet. // ASSERT( Irp->Type == IO_TYPE_IRP ); // // Update the IRP stack to point to the next location. // Irp->CurrentLocation--;//每次调用IoCallDriver CurrentLocation都会减去1 if (Irp->CurrentLocation <= 0) { KeBugCheckEx( NO_MORE_IRP_STACK_LOCATIONS, (ULONG_PTR) Irp, 0, 0, 0 ); } irpSp = IoGetNextIrpStackLocation( Irp ); Irp->Tail.Overlay.CurrentStackLocation = irpSp; // // Save a pointer to the device object for this request so that it can // be used later in completion. // irpSp->DeviceObject = DeviceObject; // // Invoke the driver at its dispatch routine entry point. // driverObject = DeviceObject->DriverObject; PERFINFO_DRIVER_MAJORFUNCTION_CALL(Irp, irpSp, driverObject); status = driverObject->MajorFunction[irpSp->MajorFunction]( DeviceObject, Irp ); PERFINFO_DRIVER_MAJORFUNCTION_RETURN(Irp, irpSp, driverObject); return status; } 每次IoCallDriver的时候,系统会自动将CurrentIrpStackLocation减去1,指向下一个IO_STACK_LOCATION |
|
[求助]由IoSetCompletionRoutine源代码引出的两点迷惑
第一个问题:我个人理解,每一个IRP动作完成后,如果上层有设置完成例程,那么就调用完成例程,个人认为当前的IrpStackLocation 对应的是上层的完成例程的函数指针。而且IoSetCompletionRoutine只是去设置下层这个值,并没有跳到下层去。 第二个问题: #define IoSkipCurrentIrpStackLocation( Irp ) \ (Irp)->CurrentLocation++; \ (Irp)->Tail.Overlay.CurrentStackLocation++; |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值