首页
社区
课程
招聘
[旧帖] VC编译器的问题..高手看下.. 0.00雪花
发表于: 2010-10-25 21:44 3303

[旧帖] VC编译器的问题..高手看下.. 0.00雪花

2010-10-25 21:44
3303
#define HOOK_SYSCALL(_Function, _Hook, _Orig )  \
        (PVOID)(_Orig) = (PVOID) InterlockedExchange( (PLONG) &MappedSystemCallTable[SYSCALL_INDEX(_Function)], (LONG) _Hook)
OldZwQuerySystemInformation =(ZWQUERYSYSTEMINFORMATION)(SYSTEMSERVICE(ZwQuerySystemInformation));
HOOK_SYSCALL( ZwQuerySystemInformation, NewZwQuerySystemInformation, OldZwQuerySystemInformation );

那位哥们看下..这个句子..一直编译不过..

error C2106: '=' : left operand must be l-value..貌似意思指针不能改变...在VC的编译器.

这种情况..该怎么解决..?

[课程]FART 脱壳王!加量不加价!FART作者讲授!

收藏
免费 0
支持
分享
最新回复 (2)
雪    币: 245
活跃值: (16)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
那位哥们看下..这个句子..一直编译不过..
应该是这句吧
OldZwQuerySystemInformation =(ZWQUERYSYSTEMINFORMATION)(SYSTEMSERVICE(ZwQuerySystemInformation));

宏定义语句没问题,这句HOOK_SYSCALL( ZwQuerySystemInformation, NewZwQuerySystemInformation, OldZwQuerySystemInformation ); 等同于:

(PVOID)(OldZwQuerySystemInformation ) = (PVOID) InterlockedExchange( (PLONG) &MappedSystemCallTable[SYSCALL_INDEX(ZwQuerySystemInformation)], (LONG)NewZwQuerySystemInformation)

代码太少,我也找不到原因,你自己检查一下
2010-10-26 12:04
0
雪    币: 245
活跃值: (16)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
大概猜一下
OldZwQuerySystemInformation 是一个PVOID类型的变量,它表示“指向void型变量地址的指针的引用”,即void*类型的指针,void 指针的特点:
(1) void 指针单向兼容其他类型的指针,即可将其它类型的指针变量赋给void指针变量。但反过来则必须进行强制转换。
(2) void指针在没有赋值前不能作为右值被引用。
2010-10-26 12:25
0
游客
登录 | 注册 方可回帖
返回
//