Could anybody point me out why this simple piece of code works with
“\Software\Adobe” or “\Software\Borland” and does not works with
"\Software\MyApp” (status==0xC00000034 – object name was not found)?
RtlInitUnicodeString(&Path2, L"\Software\MyApp");
pathLength = Path2.Length + sizeof(WCHAR);
if (path = ExAllocatePool(PagedPool, pathLength))
{
RtlZeroMemory(path, pathLength);
RtlMoveMemory(path, Path2.Buffer, Path2.Length);
status = RtlCheckRegistryKey(RTL_REGISTRY_USER,path);
ExFreePool(path);
}
The code is executed well after the creation of CURRENT_USER link, the
same negative result I have with ZwOpenKey and RtlQueryRegistryValues,
with relative or absolute path. System has all permission to my key. My
key can be created in driver or by user app – with the same result. Above
mentioned code succeed when working not with RTL_REGISTRY_USER link, but
with absolute way in the form
L\Registry\User\S-1-5-21-746137067-1383384898-1954994488-1003\Software\MyApp
or L"\Registry\User\.Default\Software\MyApp".
Thank you for any help!