阅读:1391回复:2
[请教高手]gSfDynamicFunctions载入失败的原因?
在编写自己的sfilter中总是蓝屏,调试发现gSfDynamicFunctions在完成了以下调用后所有的指针仍然是空的,为什么会这样?望高手指教,谢谢!
VOID SfLoadDynamicFunctions ( ) { UNICODE_STRING functionName; RtlZeroMemory( &gSfDynamicFunctions, sizeof( gSfDynamicFunctions ) ); RtlInitUnicodeString( &functionName, L"FsRtlRegisterFileSystemFilterCallbacks" ); gSfDynamicFunctions.RegisterFileSystemFilterCallbacks = MmGetSystemRoutineAddress( &functionName ); RtlInitUnicodeString( &functionName, L"IoAttachDeviceToDeviceStackSafe" ); gSfDynamicFunctions.AttachDeviceToDeviceStackSafe = MmGetSystemRoutineAddress( &functionName ); RtlInitUnicodeString( &functionName, L"IoEnumerateDeviceObjectList" ); gSfDynamicFunctions.EnumerateDeviceObjectList = MmGetSystemRoutineAddress( &functionName ); RtlInitUnicodeString( &functionName, L"IoGetLowerDeviceObject" ); gSfDynamicFunctions.GetLowerDeviceObject = MmGetSystemRoutineAddress( &functionName ); RtlInitUnicodeString( &functionName, L"IoGetDeviceAttachmentBaseRef" ); gSfDynamicFunctions.GetDeviceAttachmentBaseRef = MmGetSystemRoutineAddress( &functionName ); RtlInitUnicodeString( &functionName, L"IoGetDiskDeviceObject" ); gSfDynamicFunctions.GetDiskDeviceObject = MmGetSystemRoutineAddress( &functionName ); RtlInitUnicodeString( &functionName, L"IoGetAttachedDeviceReference" ); gSfDynamicFunctions.GetAttachedDeviceReference = MmGetSystemRoutineAddress( &functionName ); RtlInitUnicodeString( &functionName, L"RtlGetVersion" ); gSfDynamicFunctions.GetVersion = MmGetSystemRoutineAddress( &functionName ); } |
|
沙发#
发布于:2007-10-31 08:44
在2K下有可能没有该函数。
|
|
|
板凳#
发布于:2007-10-31 10:05
但是我的运行环境是XP啊
|
|