Пример #1
0
 internal NtQueryKey(Win32Api.KeyInformationClass KeyInformationClass,
     IntPtr KeyInformation, uint Length)
 {
     KeyInformationClass_ = KeyInformationClass;
     KeyInformation_ = KeyInformation;
     Length_ = Length;
 }
Пример #2
0
 internal static void NtQueryKey(this VirtualKey key, Win32Api.KeyInformationClass KeyInformationClass,
     IntPtr KeyInformation, uint Length, out uint ResultLength)
 {
     ResultLength = 0;
     NtQueryKey handler = new NtQueryKey(KeyInformationClass, KeyInformation, Length);
     try
     {
         key.ApplyReadOperation(null,
             new KeySecurity(Win32Api.KeySecurity.KEY_QUERY_VALUE),
             keyImpl => keyImpl.TryApply(handler));
     }
     finally
     {
         ResultLength = handler.ResultLength;
     }
 }