首页
社区
课程
招聘
[求助]奇怪的问题
发表于: 2008-4-13 13:42 4521

[求助]奇怪的问题

2008-4-13 13:42
4521
麻烦大家帮我看个问题....实在是没头绪

NTSTATUS  DriverEntry( IN PDRIVER_OBJECT DriverObject,  IN PUNICODE_STRING RegistryPath )
{

    PCSTR ModuleName[256];--------------->>>>关键一
        PCSTR T;
    PVOID ModuleBaseAdress[256];
    unsigned int ModuleLimit[256];
    ULONG size,index,ulMax,i;
        PULONG buf;
        NTSTATUS status;
        PSYSTEM_MODULE_INFORMATION module;
   
    unsigned int index2;   
    unsigned int* SSDTBase;

   
    ZwQuerySystemInformation(SystemModuleInformation,&size, 0, &size);

        if(NULL==(buf = (PULONG)ExAllocatePool(PagedPool, size)))
        {
                DbgPrint("failed alloc memory failed  \n");
                return 0;
        }
     
        status=ZwQuerySystemInformation(SystemModuleInformation,buf, size , 0);
        if(!NT_SUCCESS( status ))
        {
       DbgPrint("failed  query\n");
           return 0;
        }

        module = (PSYSTEM_MODULE_INFORMATION)(( PULONG )buf + 1);
       
        for (index = 0; index < *buf; index++)
        {
        
             ModuleName[index]=module[index].ImageName;
         ModuleBaseAdress[index]=module[index].Base;
         ModuleLimit[index]=module[index].Size;
                 
            DbgPrint("%s ",ModuleName[index]);----------->>>关键二,这句输出正常
        
        }
        ExFreePool(buf);
       

DbgPrint("%s ",ModuleName[2]);-------------->>>>>关键三,这句就蓝屏,为什么啊,关键二那里正常,这里就蓝屏
...
...
}

[培训]科锐逆向工程师培训第53期2025年7月8日开班!

收藏
免费 0
支持
分享
最新回复 (5)
雪    币: 1946
活跃值: (303)
能力值: (RANK:330 )
在线值:
发帖
回帖
粉丝
2
ExFreePool(buf);

野指针
2008-4-13 13:46
0
雪    币: 581
活跃值: (149)
能力值: ( LV12,RANK:600 )
在线值:
发帖
回帖
粉丝
3
????不解...在下面DbgPrint("%x ",ModuleBaseAdress[2])可以.....但DbgPrint("%s ",ModuleName[index]);就是不行
2008-4-13 13:53
0
雪    币: 581
活跃值: (149)
能力值: ( LV12,RANK:600 )
在线值:
发帖
回帖
粉丝
4
谢谢 Bughoho ..好了....看来真是高手啊
2008-4-13 13:55
0
雪    币: 1946
活跃值: (303)
能力值: (RANK:330 )
在线值:
发帖
回帖
粉丝
5
DbgPrint("%s ",ModuleName[2]);
ExFreePool(buf);
2008-4-13 13:56
0
雪    币: 581
活跃值: (149)
能力值: ( LV12,RANK:600 )
在线值:
发帖
回帖
粉丝
6
哈哈.....下午这个问题晕了很久...再次感谢
2008-4-13 14:03
0
游客
登录 | 注册 方可回帖
返回