ntdll: implement KeyNameInformation

André Hentschel nerv at dawncrow.de
Sun Oct 25 09:40:43 CDT 2009


---
 dlls/ntdll/reg.c   |    9 +++++++++
 include/winternl.h |    8 +++++++-
 2 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c
index f9db5a6..7d24a9b 100644
--- a/dlls/ntdll/reg.c
+++ b/dlls/ntdll/reg.c
@@ -217,6 +217,7 @@ static NTSTATUS enumerate_key( HANDLE handle, int index, KEY_INFORMATION_CLASS i
     case KeyBasicInformation: data_ptr = ((KEY_BASIC_INFORMATION *)info)->Name; break;
     case KeyFullInformation:  data_ptr = ((KEY_FULL_INFORMATION *)info)->Class; break;
     case KeyNodeInformation:  data_ptr = ((KEY_NODE_INFORMATION *)info)->Name;  break;
+    case KeyNameInformation:  data_ptr = ((KEY_NAME_INFORMATION *)info)->Name;  break;
     default:
         FIXME( "Information class %d not implemented\n", info_class );
         return STATUS_INVALID_PARAMETER;
@@ -280,6 +281,14 @@ static NTSTATUS enumerate_key( HANDLE handle, int index, KEY_INFORMATION_CLASS i
                     memcpy( info, &keyinfo, min( length, fixed_size ) );
                 }
                 break;
+            case KeyNameInformation:
+                {
+                    KEY_NAME_INFORMATION keyinfo;
+                    fixed_size = (char *)keyinfo.Name - (char *)&keyinfo;
+                    keyinfo.NameLength = reply->namelen;
+                    memcpy( info, &keyinfo, min( length, fixed_size ) );
+                }
+                break;
             }
             *result_len = fixed_size + reply->total;
             if (length < *result_len) ret = STATUS_BUFFER_OVERFLOW;
diff --git a/include/winternl.h b/include/winternl.h
index a78e9e5..633239f 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -614,7 +614,8 @@ typedef enum _FSINFOCLASS {
 typedef enum _KEY_INFORMATION_CLASS {
     KeyBasicInformation,
     KeyNodeInformation,
-    KeyFullInformation
+    KeyFullInformation,
+    KeyNameInformation
 } KEY_INFORMATION_CLASS;
 
 typedef enum _KEY_VALUE_INFORMATION_CLASS {
@@ -1068,6 +1069,11 @@ typedef struct _KEY_FULL_INFORMATION
     WCHAR         Class[1];
 } KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION;
 
+typedef struct _KEY_NAME_INFORMATION {
+    ULONG         NameLength;
+    WCHAR         Name[1];
+} KEY_NAME_INFORMATION, *PKEY_NAME_INFORMATION;
+
 typedef struct _KEY_VALUE_ENTRY
 {
     PUNICODE_STRING ValueName;
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list