Cheers,
Jon
License: X11
ChangeLog:
Jon Griffiths <jon_p_griffiths@xxxxxxxxx>
+dlls/ntdll/ntdll.spec dlls/ntdll/reg.c
Implement the Rtlp* registry functions
__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
diff -u --minimal wine/dlls/ntdll/ntdll.spec wine-develop/dlls/ntdll/ntdll.spec
--- wine/dlls/ntdll/ntdll.spec 2003-12-04 00:18:59.000000000 +0000
+++ wine-develop/dlls/ntdll/ntdll.spec 2003-12-04 06:49:12.000000000 +0000
@@ -80,7 +80,7 @@
@ stub NtCreateEventPair
@ stdcall NtCreateFile(ptr long ptr ptr long long long ptr long long ptr)
@ stub NtCreateIoCompletion
-@ stdcall NtCreateKey(long long long long long long long)
+@ stdcall NtCreateKey(ptr long ptr long ptr long long)
@ stdcall NtCreateMailslotFile(long long long long long long long long)
@ stub NtCreateMutant
@ stub NtCreateNamedPipeFile
@@ -579,12 +579,12 @@
@ stub RtlZeroHeap
@ stdcall RtlZeroMemory(ptr long)
@ stub RtlpInitializeRtl
-@ stub RtlpNtCreateKey
-@ stub RtlpNtEnumerateSubKey
-@ stub RtlpNtMakeTemporaryKey
-@ stub RtlpNtOpenKey
-@ stub RtlpNtQueryValueKey
-@ stub RtlpNtSetValueKey
+@ stdcall RtlpNtCreateKey(ptr long ptr long ptr long long)
+@ stdcall RtlpNtEnumerateSubKey(ptr ptr long)
+@ stdcall RtlpNtMakeTemporaryKey(ptr)
+@ stdcall RtlpNtOpenKey(ptr long ptr)
+@ stdcall RtlpNtQueryValueKey(long ptr ptr ptr)
+@ stdcall RtlpNtSetValueKey(ptr long ptr long)
@ stdcall RtlpUnWaitCriticalSection(ptr)
@ stdcall RtlpWaitForCriticalSection(ptr)
@ stdcall RtlxAnsiStringToUnicodeSize(ptr) RtlAnsiStringToUnicodeSize
@@ -616,7 +616,7 @@
@ stub ZwCreateEventPair
@ stdcall ZwCreateFile(ptr long ptr ptr long long long ptr long long ptr) NtCreateFile
@ stub ZwCreateIoCompletion
-@ stdcall ZwCreateKey(long long long long long long long) NtCreateKey
+@ stdcall ZwCreateKey(ptr long ptr long ptr long long) NtCreateKey
@ stdcall ZwCreateMailslotFile(long long long long long long long long) NtCreateMailslotFile
@ stub ZwCreateMutant
@ stub ZwCreateNamedPipeFile
diff -u --minimal wine/dlls/ntdll/reg.c wine-develop/dlls/ntdll/reg.c
--- wine/dlls/ntdll/reg.c 2003-09-11 16:11:06.000000000 +0000
+++ wine-develop/dlls/ntdll/reg.c 2003-12-04 07:00:55.000000000 +0000
@@ -85,6 +85,20 @@
return ret;
}
+/******************************************************************************
+ * RtlpNtCreateKey [NTDLL.@]
+ *
+ * See NtCreateKey.
+ */
+NTSTATUS WINAPI RtlpNtCreateKey( PHKEY retkey, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr,
+ ULONG TitleIndex, const UNICODE_STRING *class, ULONG options,
+ PULONG dispos )
+{
+ if (attr)
+ attr->Attributes &= ~(OBJ_PERMANENT|OBJ_EXCLUSIVE);
+
+ return NtCreateKey(retkey, access, attr, 0, NULL, 0, dispos);
+}
/******************************************************************************
* NtOpenKey [NTDLL.@]
@@ -118,6 +132,17 @@
return ret;
}
+/******************************************************************************
+ * RtlpNtOpenKey [NTDLL.@]
+ *
+ * See NtOpenKey.
+ */
+NTSTATUS WINAPI RtlpNtOpenKey( PHKEY retkey, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr )
+{
+ if (attr)
+ attr->Attributes &= ~(OBJ_PERMANENT|OBJ_EXCLUSIVE);
+ return NtOpenKey(retkey, access, attr);
+}
/******************************************************************************
* NtDeleteKey [NTDLL.@]
@@ -138,6 +163,15 @@
return ret;
}
+/******************************************************************************
+ * RtlpNtMakeTemporaryKey [NTDLL.@]
+ *
+ * See NtDeleteKey.
+ */
+NTSTATUS WINAPI RtlpNtMakeTemporaryKey( HKEY hkey )
+{
+ return NtDeleteKey(hkey);
+}
/******************************************************************************
* NtDeleteValueKey [NTDLL.@]
@@ -266,6 +300,50 @@
/******************************************************************************
+ * RtlpNtEnumerateSubKey [NTDLL.@]
+ *
+ */
+NTSTATUS WINAPI RtlpNtEnumerateSubKey( HKEY handle, UNICODE_STRING *out, ULONG index )
+{
+ KEY_BASIC_INFORMATION *info;
+ DWORD dwLen, dwResultLen;
+ NTSTATUS ret;
+
+ if (out->Length)
+ {
+ dwLen = out->Length + sizeof(KEY_BASIC_INFORMATION);
+ info = (KEY_BASIC_INFORMATION*)RtlAllocateHeap( ntdll_get_process_heap(), 0, dwLen );
+ if (!info)
+ return STATUS_NO_MEMORY;
+ }
+ else
+ dwLen = 0;
+
+ ret = NtEnumerateKey( handle, index, KeyBasicInformation, info, dwLen, &dwResultLen );
+ dwResultLen -= sizeof(KEY_BASIC_INFORMATION);
+
+ if (ret == STATUS_BUFFER_OVERFLOW)
+ out->Length = dwResultLen;
+ else if (!ret)
+ {
+ if (out->Length < info->NameLength)
+ {
+ out->Length = dwResultLen;
+ ret = STATUS_BUFFER_OVERFLOW;
+ }
+ else
+ {
+ out->Length = info->NameLength;
+ memcpy(out->Buffer, info->Name, info->NameLength);
+ }
+ }
+
+ if (info)
+ RtlFreeHeap( ntdll_get_process_heap(), 0, info );
+ return ret;
+}
+
+/******************************************************************************
* NtQueryKey [NTDLL.@]
* ZwQueryKey [NTDLL.@]
*/
@@ -421,6 +499,41 @@
return ret;
}
+/******************************************************************************
+ * RtlpNtQueryValueKey [NTDLL.@]
+ *
+ */
+NTSTATUS WINAPI RtlpNtQueryValueKey( HKEY handle, ULONG *result_type, PBYTE dest,
+ DWORD *result_len )
+{
+ KEY_VALUE_PARTIAL_INFORMATION *info;
+ UNICODE_STRING name;
+ NTSTATUS ret;
+ DWORD dwResultLen;
+ DWORD dwLen = sizeof (KEY_VALUE_PARTIAL_INFORMATION) + result_len ? *result_len : 0;
+
+ info = (KEY_VALUE_PARTIAL_INFORMATION*)RtlAllocateHeap( ntdll_get_process_heap(), 0, dwLen );
+ if (!info)
+ return STATUS_NO_MEMORY;
+
+ name.Length = 0;
+ ret = NtQueryValueKey( handle, &name, KeyValuePartialInformation, info, dwLen, &dwResultLen );
+
+ if (!ret || ret == STATUS_BUFFER_OVERFLOW)
+ {
+ if (result_len)
+ *result_len = info->DataLength;
+
+ if (result_type)
+ *result_type = info->Type;
+
+ if (ret != STATUS_BUFFER_OVERFLOW)
+ memcpy( dest, info->Data, info->DataLength );
+ }
+
+ RtlFreeHeap( ntdll_get_process_heap(), 0, info );
+ return ret;
+}
/******************************************************************************
* NtFlushKey [NTDLL.@]
@@ -572,6 +685,19 @@
}
/******************************************************************************
+ * RtlpNtSetValueKey [NTDLL.@]
+ *
+ */
+NTSTATUS WINAPI RtlpNtSetValueKey( HKEY hkey, ULONG type, const void *data,
+ ULONG count )
+{
+ UNICODE_STRING name;
+
+ name.Length = 0;
+ return NtSetValueKey( hkey, &name, 0, type, data, count );
+}
+
+/******************************************************************************
* NtUnloadKey [NTDLL.@]
* ZwUnloadKey [NTDLL.@]
*/