阅读:2312回复:3
调用MmProbeAndLockPages出现0x00000050错误蓝屏
调用MmProbeAndLockPages出现0x00000050错误蓝屏
调用MmProbeAndLockPages,在MmProbeAndLockPages里面出现错误蓝屏,错误码为0x00000050(PAGE_FAULT_IN_NONPAGED_AREA),请 问有人遇到过吗,能否帮忙解答下,我的代码片段如下: if (cinfo->comp_info == NULL) cinfo->comp_info = (jpeg_component_info *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, cinfo->num_components * SIZEOF(jpeg_component_info)); if (cinfo->comp_info == NULL) { DbgPrint("Allocate comp_info fail\n"); return FALSE; } cominfoMdl = IoAllocateMdl(cinfo->comp_info, cinfo->num_components * SIZEOF(jpeg_component_info), FALSE, FALSE, NULL ); if (cominfoMdl == NULL) { DbgPrint("Allocate mdl fail\n"); return FALSE; } MmBuildMdlForNonPagedPool(cominfoMdl); try { MmProbeAndLockPages(cominfoMdl, KernelMode, IoWriteAccess); } except(EXCEPTION_EXECUTE_HANDLER) { DbgPrint("MmProbeAndLockPages fail\n"); IoFreeMdl(cominfoMdl); return FALSE; } compptr = MmGetSystemAddressForMdlSafe(cominfoMdl, NormalPagePriority); if (compptr == NULL) { DbgPrint("MmGetSystemAddressForMdlSafe fail\n"); MmUnlockPages(cominfoMdl); IoFreeMdl(cominfoMdl); return FALSE; } |
|
沙发#
发布于:2010-04-22 11:09
except进去了吗?
|
|
|
板凳#
发布于:2010-04-22 18:26
如果你的虚拟内存地址是分页内存地址,调用MmBuildMdlForNonPagedPool肯定会出问题。
|
|
地板#
发布于:2010-04-26 12:08
except没有进去,我分配的是paged memory, 把MmBuildMdlForNonPagedPool拿掉了仍然会蓝屏
|
|