阅读:1665回复:3
"error LNK2019: unresolved external symbol _HookZwCreateProcess@0 "如何解决?谢谢!
HookZwCreateProcess例程的实现放在了Process.c中,
形式如下: VOID NTAPI HookZwCreateProcess() { 。。。。 } HookZwCreateProcess例程的声明放在了Process.h中, 形式如下: VOID NTAPI HookZwCreateProcess(); 而真正的调用,放在了Main.c中, 形式如下: NTSTATUS DeviceControl( IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, IN PVOID InputBuffer, IN ULONG InputBufferLength, OUT PVOID OutputBuffer, IN ULONG OutputBufferLength, IN ULONG IoControlCode, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject ) { IoStatus->Status = STATUS_SUCCESS; IoStatus->Information = 0; switch( IoControlCode ) { case CTL_CODE_LSR_HOOK_ZWCREATEPROCESS: { HookZwCreateProcess(); } break; default:break; } return IoStatus->Status; } 编译时,出现了: error LNK2019: unresolved external symbol _HookZwCreateProcess@0 referenced in function _DeviceControl@36 错误提示,如何解决? 谢谢大侠 |
|
沙发#
发布于:2009-07-04 11:58
用extern "C"声明HookZwCreateProcess试一下
extern "C" VOID NTAPI HookZwCreateProcess(){ 。。。。 } |
|
板凳#
发布于:2009-07-04 17:03
用了,没有解决!
#ifdef __cplusplus extern "C" #endif VOID NTAPI HookZwCreateProcess(); 期盼高手 |
|
地板#
发布于:2009-07-06 03:54
问题都不会提!!!
要把你的工作环境说一下!! 源码上传!! 不然没人给你解决!! |
|