擦除Hive注册表 [英] Erasing Hive Registry

查看:115
本文介绍了擦除Hive注册表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图删除Hive注册表。

I have been trying to erase the Hive registry.

幸运的是,我找到了这个论坛(http://geekswithblogs.net/BruceEitman/archive/2009/04/ 28 / windows-ce-cleaning-the-registry-hive.aspx) 告诉我可以通过在kernelIoControl 中添加新功能来完成。
我试着打电话给它并在其中一个驱动程序中调试它,发现当我打电话给  kernelIoControl,它引导我进入  
C:\ WINCE800 \ private \ winceos \ coreos \ core \ thunks \tkfuncs.cpp中的XXX_KernelIoControl函数。在函数结束时,
KernelIoControl被调用,我不再能访问源代码了(带我去汇编代码)。

Luckily, I found this forum(http://geekswithblogs.net/BruceEitman/archive/2009/04/28/windows-ce-cleaning-the-registry-hive.aspx) which tells me that it can be done by adding a new functionality in the kernelIoControl. I tried to call it and debugged it within one of the drivers and found that when I called  kernelIoControl, It lead me to XXX_KernelIoControl function in  C:\WINCE800\private\winceos\coreos\core\thunks\tkfuncs.cpp. At the end of the function, KernelIoControl is being called and I don't have access to the source code anymore (took me to assembly code).

论坛提供了一个用于设置标志以清除配置单注册表的示例代码(请参阅下面的代码)。 

The forum provided an example code for setting the flag to erase the hive registry (see code below). 


DWORD * pFlags =(DWORD *)lpInBuf;
DWORD *pFlags = (DWORD *)lpInBuf;

推荐答案

我不太明白你为什么试图在IOCTL范围之外找到pClean。

I don't quite understand why do you try to find pClean outside of IOCTL scope.

pClean是临时变量并指向out缓冲区。

pClean is temporary variable and points to out buffer.

在代码中查看: BOOL  * pClean =(BOOL *)lpOutBuf;

pClean point与lpOutBuf相同的RAM

pClean point to the same RAM as lpOutBuf

工作原理:

1。内核调用您的IOCTL代码并为您的代码提供lpOutBuffer以将结果存储到。

1. Kernel calls your IOCTL code and provides lpOutBuffer for your code to store result to.

2。你的代码完成了他的工作并将操作结果存储到pClean(和lpOutBuf,因为它们是相同的)

2. Your code does his job and stores result of operation to pClean (and to lpOutBuf since they are equal)

3。代码完成后,内核将分析lpOutBuf中的内容并擦除配置单元如果告知

3. After your code finishes, kernel will analyze what is in lpOutBuf and erase hive if told so

您可以替换 * pClean = TRUE; *((BOOL *)lpOutBuf)= TRUE ;结果将是相同的。

You can replace *pClean = TRUE; with *((BOOL*)lpOutBuf) = TRUE; result will be the same.

希望我能正确理解你的问题......

Hope I understood your question correctly...


这篇关于擦除Hive注册表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆