[求助]RtlDeleteRegistryValue怎么用的?
发表于:
2009-1-31 15:25
6450
[求助]RtlDeleteRegistryValue怎么用的?
MSDN中:
NTSYSAPI
NTSTATUS
NTAPI
RtlDeleteRegistryValue(
IN ULONG RelativeTo,
IN PCWSTR Path,
IN PCWSTR ValueName
);
部分代码如下:
#include "Ntddk.h"
NTSTATUS DriverEntry(IN PDRIVER_OBJECT theDriverObject,IN PUNICODE_STRING
theRegistryPath)
{
NTSTATUS status=STATUS_SUCCESS;
ULONG RelativeTo=RTL_REGISTRY_CONTROL;
PCWSTR Path=NULL;
PCWSTR ValueName=123;
RtlDeleteRegistryValue(&RelativeTo,&Path,&ValueName);
theDriverObject->DriverUnload;
return STATUS_SUCCESS;
}
编译时产生错误:
1>mydriver1.c(7) : error C2220: warning treated as error - no object file generated
1>mydriver1.c(7) : error C4047: 'initializing' : 'PCWSTR' differs in levels of indirection from 'int'
1>mydriver1.c(8) : error C4047: 'function' : 'ULONG' differs in levels of indirection from 'ULONG *'
1>mydriver1.c(8) : error C4047: 'function' : 'PCWSTR' differs in levels of indirection from 'PCWSTR * '
1>mydriver1.c(8) : error C4047: 'function' : 'PCWSTR' differs in levels of indirection from 'PCWSTR * '
该怎么修改
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课