+FORCEINLINE
+VOID
+RtlpCloseRegistryHandle(
+ _In_ ULONG RelativeTo,
+ _In_ HANDLE KeyHandle)
+{
+ /* Did the caller pass a key handle? */
+ if (!(RelativeTo & RTL_REGISTRY_HANDLE))
+ {
+ /* We opened the key in RtlpGetRegistryHandle, so close it now */
+ ZwClose(KeyHandle);
+ }
+}
+