Run-Time Library (RTL) Rout ...


Windows Driver Kit: Kernel-Mode Driver Architecture
RtlCheckRegistryKey

The RtlCheckRegistryKey routine checks for the existence of a given named key in the registry.

NTSTATUS 
  RtlCheckRegistryKey(
    IN ULONG  RelativeTo,
    IN PWSTR  Path
    );

Parameters

RelativeTo
Specifies whether Path is an absolute registry path or is relative to a predefined key path as one of the following.
ValueMeaning
RTL_REGISTRY_ABSOLUTEPath is an absolute registry path.
RTL_REGISTRY_CONTROLPath is relative to \Registry\Machine\System\CurrentControlSet\Control.
RTL_REGISTRY_DEVICEMAPPath is relative to \Registry\Machine\Hardware\DeviceMap.
RTL_REGISTRY_SERVICESPath is relative to \Registry\Machine\System\CurrentControlSet\Services.
RTL_REGISTRY_USERPath is relative to the registry settings for the current user. (For a system process, this is \Users\.Default.) This is equivalent to HKEY_CURRENT_USER in user-mode.
RTL_REGISTRY_WINDOWS_NTPath is relative to \Registry\Machine\Software\Microsoft\
Windows NT\CurrentVersion
.
RTL_REGISTRY_HANDLEThis value should not be passed into this routine. Despite the redundancy of a check for the existence of an already-opened key, it has the side effect of closing the passed handle.

Path
Specifies the registry path according to the RelativeTo value. If RTL_REGISTRY_HANDLE is set, Path is a handle to be used directly.

Return Value

If the given named key exists in the registry along the given relative path, RtlCheckRegistryKey returns STATUS_SUCCESS.

Requirements

IRQL: PASSIVE_LEVEL

Headers: Declared in Ntddk.h. Include Ntddk.h.

See Also

RtlQueryRegistryValues


Send feedback on this topic
Built on October 01, 2009
Page view tracker