如何在驱动程序级别提取图像文件名?

时间:2012-06-13 10:12:56

标签: device-driver minifilter

我想在minifilter文件系统驱动程序中提取进程映像名称。 我正在做这样的事情,但我得到了一个BSOD。缓冲区分配可能有误?

status = ZwQueryInformationProcess( NtCurrentProcess(),
                                    ProcessImageFileName,
                                    buffer,
                                    returnedLength,
                                    &returnedLength );

1 个答案:

答案 0 :(得分:1)

不建议使用ZwQueryInformationProcess来获取流程信息。

最好的方法是使用PsSetCreateProcessNotifyRoutinePsSetLoadImageNotifyRoutine并准备好您自己的流程列表。

相关问题