/* INCLUDES *****************************************************************/
-#include "advapi32.h"
+#include <advapi32.h>
#define NDEBUG
-#include <debug.h>
+#include <wine/debug.h>
/* DEFINES ******************************************************************/
BOOL
RegInitialize (VOID)
{
- DPRINT("RegInitialize()\n");
+ TRACE("RegInitialize()\n");
ProcessHeap = RtlGetProcessHeap();
RtlZeroMemory (DefaultHandleTable,
BOOL
RegCleanup (VOID)
{
- DPRINT("RegCleanup()\n");
+ TRACE("RegCleanup()\n");
CloseDefaultKeys ();
RtlDeleteCriticalSection (&HandleTableCS);
ULONG Index;
NTSTATUS Status = STATUS_SUCCESS;
- DPRINT("MapDefaultKey (Key %x)\n", Key);
+ TRACE("MapDefaultKey (Key %x)\n", Key);
if (((ULONG)Key & 0xF0000000) != 0x80000000)
{
break;
default:
- DPRINT("MapDefaultHandle() no handle creator\n");
+ WARN("MapDefaultHandle() no handle creator\n");
Status = STATUS_INVALID_PARAMETER;
}
}
OpenClassesRootKey (PHANDLE KeyHandle)
{
OBJECT_ATTRIBUTES Attributes;
- UNICODE_STRING KeyName = ROS_STRING_INITIALIZER(L"\\Registry\\Machine\\Software\\CLASSES");
+ UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\CLASSES");
- DPRINT("OpenClassesRootKey()\n");
+ TRACE("OpenClassesRootKey()\n");
InitializeObjectAttributes (&Attributes,
&KeyName,
OpenLocalMachineKey (PHANDLE KeyHandle)
{
OBJECT_ATTRIBUTES Attributes;
- UNICODE_STRING KeyName = ROS_STRING_INITIALIZER(L"\\Registry\\Machine");
+ UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine");
NTSTATUS Status;
- DPRINT("OpenLocalMachineKey()\n");
+ TRACE("OpenLocalMachineKey()\n");
InitializeObjectAttributes (&Attributes,
&KeyName,
MAXIMUM_ALLOWED,
&Attributes);
- DPRINT("NtOpenKey(%wZ) => %08x\n", &KeyName, Status);
+ TRACE("NtOpenKey(%wZ) => %08x\n", &KeyName, Status);
return Status;
}
OpenUsersKey (PHANDLE KeyHandle)
{
OBJECT_ATTRIBUTES Attributes;
- UNICODE_STRING KeyName = ROS_STRING_INITIALIZER(L"\\Registry\\User");
+ UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\User");
- DPRINT("OpenUsersKey()\n");
+ TRACE("OpenUsersKey()\n");
InitializeObjectAttributes (&Attributes,
&KeyName,
{
OBJECT_ATTRIBUTES Attributes;
UNICODE_STRING KeyName =
- ROS_STRING_INITIALIZER(L"\\Registry\\Machine\\System\\CurrentControlSet\\Hardware Profiles\\Current");
+ RTL_CONSTANT_STRING(L"\\Registry\\Machine\\System\\CurrentControlSet\\Hardware Profiles\\Current");
- DPRINT("OpenCurrentConfigKey()\n");
+ TRACE("OpenCurrentConfigKey()\n");
InitializeObjectAttributes (&Attributes,
&KeyName,
}
+/************************************************************************
+ * RegCopyTreeW
+ *
+ * @unimplemented
+ */
+LONG STDCALL
+RegCopyTreeW(IN HKEY hKeySrc,
+ IN LPCWSTR lpSubKey OPTIONAL,
+ IN HKEY hKeyDest)
+{
+ HANDLE DestKeyHandle, KeyHandle, SubKeyHandle = NULL;
+ NTSTATUS Status;
+
+ Status = MapDefaultKey(&KeyHandle,
+ hKeySrc);
+ if (!NT_SUCCESS(Status))
+ {
+ return RtlNtStatusToDosError(Status);
+ }
+
+ Status = MapDefaultKey(&DestKeyHandle,
+ hKeyDest);
+ if (!NT_SUCCESS(Status))
+ {
+ return RtlNtStatusToDosError(Status);
+ }
+
+ if (lpSubKey != NULL)
+ {
+ OBJECT_ATTRIBUTES ObjectAttributes;
+ UNICODE_STRING SubKeyName;
+
+ RtlInitUnicodeString(&SubKeyName,
+ (LPWSTR)lpSubKey);
+
+ InitializeObjectAttributes(&ObjectAttributes,
+ &SubKeyName,
+ OBJ_CASE_INSENSITIVE,
+ KeyHandle,
+ NULL);
+
+ Status = NtOpenKey(&SubKeyHandle,
+ KEY_READ,
+ &ObjectAttributes);
+ if (!NT_SUCCESS(Status))
+ {
+ return RtlNtStatusToDosError(Status);
+ }
+ }
+
+ /* FIXME - copy all keys and values recursively */
+ Status = STATUS_NOT_IMPLEMENTED;
+
+ if (SubKeyHandle != NULL)
+ {
+ NtClose(SubKeyHandle);
+ }
+
+ if (!NT_SUCCESS(Status))
+ {
+ return RtlNtStatusToDosError(Status);
+ }
+
+ return ERROR_SUCCESS;
+}
+
+
+/************************************************************************
+ * RegCopyTreeA
+ *
+ * @implemented
+ */
+LONG STDCALL
+RegCopyTreeA(IN HKEY hKeySrc,
+ IN LPCSTR lpSubKey OPTIONAL,
+ IN HKEY hKeyDest)
+{
+ UNICODE_STRING SubKeyName;
+ LONG Ret;
+
+ if (lpSubKey != NULL)
+ {
+ if (!RtlCreateUnicodeStringFromAsciiz(&SubKeyName,
+ (LPSTR)lpSubKey))
+ {
+ return ERROR_NOT_ENOUGH_MEMORY;
+ }
+ }
+ else
+ RtlInitUnicodeString(&SubKeyName,
+ NULL);
+
+ Ret = RegCopyTreeW(hKeySrc,
+ SubKeyName.Buffer,
+ hKeyDest);
+
+ RtlFreeUnicodeString(&SubKeyName);
+
+ return Ret;
+}
+
+
/************************************************************************
* RegConnectRegistryW
*
ClassString,
dwOptions,
(PULONG)lpdwDisposition);
- DPRINT("NtCreateKey(%wZ) called (Status %lx)\n", ObjectAttributes->ObjectName, Status);
+ TRACE("NtCreateKey(%wZ) called (Status %lx)\n", ObjectAttributes->ObjectName, Status);
if (Status != STATUS_OBJECT_NAME_NOT_FOUND)
return Status;
NULL,
0,
&Disposition);
- DPRINT("NtCreateKey(%wZ) called (Status %lx)\n", &LocalKeyName, Status);
+ TRACE("NtCreateKey(%wZ) called (Status %lx)\n", &LocalKeyName, Status);
}
if (!NT_SUCCESS(Status))
NULL,
0,
&Disposition);
- DPRINT("NtCreateKey(%wZ) called (Status %lx)\n", &LocalKeyName, Status);
+ TRACE("NtCreateKey(%wZ) called (Status %lx)\n", &LocalKeyName, Status);
if (!NT_SUCCESS(Status))
break;
}
HANDLE ParentKey;
NTSTATUS Status;
- DPRINT("RegCreateKeyExA() called\n");
+ TRACE("RegCreateKeyExA() called\n");
/* get the real parent key */
Status = MapDefaultKey (&ParentKey,
{
return RtlNtStatusToDosError (Status);
}
- DPRINT("ParentKey %x\n", (ULONG)ParentKey);
+ TRACE("ParentKey %x\n", (ULONG)ParentKey);
if (lpClass != NULL)
{
RtlFreeUnicodeString (&ClassString);
}
- DPRINT("Status %x\n", Status);
+ TRACE("Status %x\n", Status);
if (!NT_SUCCESS(Status))
{
return RtlNtStatusToDosError (Status);
HANDLE ParentKey;
NTSTATUS Status;
- DPRINT("RegCreateKeyExW() called\n");
+ TRACE("RegCreateKeyExW() called\n");
/* get the real parent key */
Status = MapDefaultKey (&ParentKey,
{
return RtlNtStatusToDosError(Status);
}
- DPRINT("ParentKey %x\n", (ULONG)ParentKey);
+ TRACE("ParentKey %x\n", (ULONG)ParentKey);
RtlInitUnicodeString (&ClassString,
lpClass);
dwOptions,
samDesired,
lpdwDisposition);
- DPRINT("Status %x\n", Status);
+ TRACE("Status %x\n", Status);
if (!NT_SUCCESS(Status))
{
return RtlNtStatusToDosError (Status);
}
+/************************************************************************
+ * RegDeleteKeyValueW
+ *
+ * @implemented
+ */
+LONG STDCALL
+RegDeleteKeyValueW(IN HKEY hKey,
+ IN LPCWSTR lpSubKey OPTIONAL,
+ IN LPCWSTR lpValueName OPTIONAL)
+{
+ UNICODE_STRING ValueName;
+ HANDLE KeyHandle, SubKeyHandle = NULL;
+ NTSTATUS Status;
+
+ Status = MapDefaultKey(&KeyHandle,
+ hKey);
+ if (!NT_SUCCESS(Status))
+ {
+ return RtlNtStatusToDosError(Status);
+ }
+
+ if (lpSubKey != NULL)
+ {
+ OBJECT_ATTRIBUTES ObjectAttributes;
+ UNICODE_STRING SubKeyName;
+
+ RtlInitUnicodeString(&SubKeyName,
+ (LPWSTR)lpSubKey);
+
+ InitializeObjectAttributes(&ObjectAttributes,
+ &SubKeyName,
+ OBJ_CASE_INSENSITIVE,
+ KeyHandle,
+ NULL);
+
+ Status = NtOpenKey(&SubKeyHandle,
+ KEY_SET_VALUE,
+ &ObjectAttributes);
+ if (!NT_SUCCESS(Status))
+ {
+ return RtlNtStatusToDosError(Status);
+ }
+ }
+
+ RtlInitUnicodeString(&ValueName,
+ (LPWSTR)lpValueName);
+
+ Status = NtDeleteValueKey((SubKeyHandle != NULL) ? SubKeyHandle : KeyHandle,
+ &ValueName);
+
+ if (SubKeyHandle != NULL)
+ {
+ NtClose(SubKeyHandle);
+ }
+
+ if (!NT_SUCCESS(Status))
+ {
+ return RtlNtStatusToDosError(Status);
+ }
+
+ return ERROR_SUCCESS;
+}
+
+
+/************************************************************************
+ * RegDeleteKeyValueA
+ *
+ * @implemented
+ */
+LONG STDCALL
+RegDeleteKeyValueA(IN HKEY hKey,
+ IN LPCSTR lpSubKey OPTIONAL,
+ IN LPCSTR lpValueName OPTIONAL)
+{
+ UNICODE_STRING SubKey, ValueName;
+ LONG Ret;
+
+ if (lpSubKey != NULL)
+ {
+ if (!RtlCreateUnicodeStringFromAsciiz(&SubKey,
+ (LPSTR)lpSubKey))
+ {
+ return ERROR_NOT_ENOUGH_MEMORY;
+ }
+ }
+ else
+ RtlInitUnicodeString(&SubKey,
+ NULL);
+
+ if (lpValueName != NULL)
+ {
+ if (!RtlCreateUnicodeStringFromAsciiz(&ValueName,
+ (LPSTR)lpValueName))
+ {
+ RtlFreeUnicodeString(&SubKey);
+ return ERROR_NOT_ENOUGH_MEMORY;
+ }
+ }
+ else
+ RtlInitUnicodeString(&ValueName,
+ NULL);
+
+ Ret = RegDeleteKeyValueW(hKey,
+ SubKey.Buffer,
+ SubKey.Buffer);
+
+ RtlFreeUnicodeString(&SubKey);
+ RtlFreeUnicodeString(&ValueName);
+
+ return Ret;
+}
+
+
+/************************************************************************
+ * RegDeleteTreeW
+ *
+ * @unimplemented
+ */
+LONG STDCALL
+RegDeleteTreeW(IN HKEY hKey,
+ IN LPCWSTR lpSubKey OPTIONAL)
+{
+ HANDLE KeyHandle, SubKeyHandle = NULL;
+ NTSTATUS Status;
+
+ Status = MapDefaultKey(&KeyHandle,
+ hKey);
+ if (!NT_SUCCESS(Status))
+ {
+ return RtlNtStatusToDosError(Status);
+ }
+
+ if (lpSubKey != NULL)
+ {
+ OBJECT_ATTRIBUTES ObjectAttributes;
+ UNICODE_STRING SubKeyName;
+
+ RtlInitUnicodeString(&SubKeyName,
+ (LPWSTR)lpSubKey);
+
+ InitializeObjectAttributes(&ObjectAttributes,
+ &SubKeyName,
+ OBJ_CASE_INSENSITIVE,
+ KeyHandle,
+ NULL);
+
+ Status = NtOpenKey(&SubKeyHandle,
+ DELETE | KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE,
+ &ObjectAttributes);
+ if (!NT_SUCCESS(Status))
+ {
+ return RtlNtStatusToDosError(Status);
+ }
+ }
+
+ /* FIXME - delete all keys recursively */
+ Status = STATUS_NOT_IMPLEMENTED;
+
+ if (SubKeyHandle != NULL)
+ {
+ NtClose(SubKeyHandle);
+ }
+
+ if (!NT_SUCCESS(Status))
+ {
+ return RtlNtStatusToDosError(Status);
+ }
+
+ return ERROR_SUCCESS;
+}
+
+
+/************************************************************************
+ * RegDeleteTreeA
+ *
+ * @implemented
+ */
+LONG STDCALL
+RegDeleteTreeA(IN HKEY hKey,
+ IN LPCSTR lpSubKey OPTIONAL)
+{
+ UNICODE_STRING SubKeyName;
+ LONG Ret;
+
+ if (lpSubKey != NULL)
+ {
+ if (!RtlCreateUnicodeStringFromAsciiz(&SubKeyName,
+ (LPSTR)lpSubKey))
+ {
+ return ERROR_NOT_ENOUGH_MEMORY;
+ }
+ }
+ else
+ RtlInitUnicodeString(&SubKeyName,
+ NULL);
+
+ Ret = RegDeleteTreeW(hKey,
+ SubKeyName.Buffer);
+
+ RtlFreeUnicodeString(&SubKeyName);
+
+ return Ret;
+}
+
+
+/************************************************************************
+ * RegSetKeyValueW
+ *
+ * @implemented
+ */
+LONG STDCALL
+RegSetKeyValueW(IN HKEY hKey,
+ IN LPCWSTR lpSubKey OPTIONAL,
+ IN LPCWSTR lpValueName OPTIONAL,
+ IN DWORD dwType,
+ IN LPCVOID lpData OPTIONAL,
+ IN DWORD cbData)
+{
+ HANDLE KeyHandle, SubKeyHandle = NULL;
+ NTSTATUS Status;
+ LONG Ret;
+
+ Status = MapDefaultKey(&KeyHandle,
+ hKey);
+ if (!NT_SUCCESS(Status))
+ {
+ return RtlNtStatusToDosError(Status);
+ }
+
+ if (lpSubKey != NULL)
+ {
+ OBJECT_ATTRIBUTES ObjectAttributes;
+ UNICODE_STRING SubKeyName;
+
+ RtlInitUnicodeString(&SubKeyName,
+ (LPWSTR)lpSubKey);
+
+ InitializeObjectAttributes(&ObjectAttributes,
+ &SubKeyName,
+ OBJ_CASE_INSENSITIVE,
+ KeyHandle,
+ NULL);
+
+ Status = NtOpenKey(&SubKeyHandle,
+ KEY_SET_VALUE,
+ &ObjectAttributes);
+ if (!NT_SUCCESS(Status))
+ {
+ return RtlNtStatusToDosError(Status);
+ }
+ }
+
+ Ret = RegSetValueExW((SubKeyHandle != NULL) ? SubKeyHandle : KeyHandle,
+ lpValueName,
+ 0,
+ dwType,
+ lpData,
+ cbData);
+
+ if (SubKeyHandle != NULL)
+ {
+ NtClose(SubKeyHandle);
+ }
+
+ return Ret;
+}
+
+
+/************************************************************************
+ * RegSetKeyValueA
+ *
+ * @implemented
+ */
+LONG STDCALL
+RegSetKeyValueA(IN HKEY hKey,
+ IN LPCSTR lpSubKey OPTIONAL,
+ IN LPCSTR lpValueName OPTIONAL,
+ IN DWORD dwType,
+ IN LPCVOID lpData OPTIONAL,
+ IN DWORD cbData)
+{
+ HANDLE KeyHandle, SubKeyHandle = NULL;
+ NTSTATUS Status;
+ LONG Ret;
+
+ Status = MapDefaultKey(&KeyHandle,
+ hKey);
+ if (!NT_SUCCESS(Status))
+ {
+ return RtlNtStatusToDosError(Status);
+ }
+
+ if (lpSubKey != NULL)
+ {
+ OBJECT_ATTRIBUTES ObjectAttributes;
+ UNICODE_STRING SubKeyName;
+
+ if (!RtlCreateUnicodeStringFromAsciiz(&SubKeyName,
+ (LPSTR)lpSubKey))
+ {
+ return ERROR_NOT_ENOUGH_MEMORY;
+ }
+
+ InitializeObjectAttributes(&ObjectAttributes,
+ &SubKeyName,
+ OBJ_CASE_INSENSITIVE,
+ KeyHandle,
+ NULL);
+
+ Status = NtOpenKey(&SubKeyHandle,
+ KEY_SET_VALUE,
+ &ObjectAttributes);
+
+ RtlFreeUnicodeString(&SubKeyName);
+
+ if (!NT_SUCCESS(Status))
+ {
+ return RtlNtStatusToDosError(Status);
+ }
+ }
+
+ Ret = RegSetValueExA((SubKeyHandle != NULL) ? SubKeyHandle : KeyHandle,
+ lpValueName,
+ 0,
+ dwType,
+ lpData,
+ cbData);
+
+ if (SubKeyHandle != NULL)
+ {
+ NtClose(SubKeyHandle);
+ }
+
+ return Ret;
+}
+
+
/************************************************************************
* RegDeleteValueA
*
HANDLE KeyHandle;
NTSTATUS Status;
- DPRINT("RegEnumKeyExA(hKey 0x%x, dwIndex %d, lpName 0x%x, *lpcbName %d, lpClass 0x%x, lpcbClass %d)\n",
+ TRACE("RegEnumKeyExA(hKey 0x%x, dwIndex %d, lpName 0x%x, *lpcbName %d, lpClass 0x%x, lpcbClass %d)\n",
hKey, dwIndex, lpName, *lpcbName, lpClass, lpcbClass ? *lpcbClass : 0);
if ((lpClass) && (!lpcbClass))
KeyInfo,
BufferSize,
&ResultSize);
- DPRINT("NtEnumerateKey() returned status 0x%X\n", Status);
+ TRACE("NtEnumerateKey() returned status 0x%X\n", Status);
if (!NT_SUCCESS(Status))
{
ErrorCode = RtlNtStatusToDosError (Status);
}
}
- DPRINT("Key Namea0 Length %d\n", StringU.Length);
- DPRINT("Key Namea1 Length %d\n", NameLength);
- DPRINT("Key Namea Length %d\n", *lpcbName);
- DPRINT("Key Namea %s\n", lpName);
+ TRACE("Key Namea0 Length %d\n", StringU.Length);
+ TRACE("Key Namea1 Length %d\n", NameLength);
+ TRACE("Key Namea Length %d\n", *lpcbName);
+ TRACE("Key Namea %s\n", lpName);
RtlFreeHeap (ProcessHeap,
0,
KeyInfo,
BufferSize,
&ResultSize);
- DPRINT("NtEnumerateKey() returned status 0x%X\n", Status);
+ TRACE("NtEnumerateKey() returned status 0x%X\n", Status);
if (!NT_SUCCESS(Status))
{
ErrorCode = RtlNtStatusToDosError (Status);
hKey);
if (!NT_SUCCESS(Status))
{
- DPRINT("MapDefaultKey() failed (Status %lx)\n", Status);
+ TRACE("MapDefaultKey() failed (Status %lx)\n", Status);
return RtlNtStatusToDosError (Status);
}
lpcbSecurityDescriptor);
if (!NT_SUCCESS(Status))
{
- DPRINT("NtQuerySecurityObject() failed (Status %lx)\n", Status);
+ WARN("NtQuerySecurityObject() failed (Status %lx)\n", Status);
return RtlNtStatusToDosError (Status);
}
LPCSTR lpSubKey,
PHKEY phkResult)
{
- DPRINT("RegOpenKeyA hKey 0x%x lpSubKey %s phkResult %p\n", hKey, lpSubKey, phkResult);
+ TRACE("RegOpenKeyA hKey 0x%x lpSubKey %s phkResult %p\n", hKey, lpSubKey, phkResult);
if (!lpSubKey || !*lpSubKey)
{
LPCWSTR lpSubKey,
PHKEY phkResult)
{
- DPRINT("RegOpenKeyW hKey 0x%x lpSubKey %S phkResult %p\n", hKey, lpSubKey, phkResult);
+ TRACE("RegOpenKeyW hKey 0x%x lpSubKey %S phkResult %p\n", hKey, lpSubKey, phkResult);
if (!lpSubKey || !*lpSubKey)
{
HANDLE KeyHandle;
NTSTATUS Status;
- DPRINT("RegOpenKeyExA hKey 0x%x lpSubKey %s ulOptions 0x%x samDesired 0x%x phkResult %p\n",
+ TRACE("RegOpenKeyExA hKey 0x%x lpSubKey %s ulOptions 0x%x samDesired 0x%x phkResult %p\n",
hKey, lpSubKey, ulOptions, samDesired, phkResult);
Status = MapDefaultKey (&KeyHandle, hKey);
HANDLE KeyHandle;
NTSTATUS Status;
- DPRINT("RegOpenKeyExW hKey 0x%x lpSubKey %S ulOptions 0x%x samDesired 0x%x phkResult %p\n",
+ TRACE("RegOpenKeyExW hKey 0x%x lpSubKey %S ulOptions 0x%x samDesired 0x%x phkResult %p\n",
hKey, lpSubKey, ulOptions, samDesired, phkResult);
Status = MapDefaultKey (&KeyHandle, hKey);
RtlAppendUnicodeToString(&UserClassesKeyRoot,
UserClassesKeySuffix);
- DPRINT("RegOpenUserClassesRoot: Absolute path: %wZ\n", &UserClassesKeyRoot);
+ TRACE("RegOpenUserClassesRoot: Absolute path: %wZ\n", &UserClassesKeyRoot);
/*
* Open the key
FullInfo,
FullInfoSize,
&Length);
- DPRINT("NtQueryKey() returned status 0x%X\n", Status);
+ TRACE("NtQueryKey() returned status 0x%X\n", Status);
if (!NT_SUCCESS(Status))
{
if (lpClass != NULL)
return RtlNtStatusToDosError (Status);
}
- DPRINT("SubKeys %d\n", FullInfo->SubKeys);
+ TRACE("SubKeys %d\n", FullInfo->SubKeys);
if (lpcSubKeys != NULL)
{
*lpcSubKeys = FullInfo->SubKeys;
}
- DPRINT("MaxNameLen %lu\n", FullInfo->MaxNameLen);
+ TRACE("MaxNameLen %lu\n", FullInfo->MaxNameLen);
if (lpcbMaxSubKeyLen != NULL)
{
*lpcbMaxSubKeyLen = FullInfo->MaxNameLen / sizeof(WCHAR) + 1;
}
- DPRINT("MaxClassLen %lu\n", FullInfo->MaxClassLen);
+ TRACE("MaxClassLen %lu\n", FullInfo->MaxClassLen);
if (lpcbMaxClassLen != NULL)
{
*lpcbMaxClassLen = FullInfo->MaxClassLen / sizeof(WCHAR) + 1;
}
- DPRINT("Values %lu\n", FullInfo->Values);
+ TRACE("Values %lu\n", FullInfo->Values);
if (lpcValues != NULL)
{
*lpcValues = FullInfo->Values;
}
- DPRINT("MaxValueNameLen %lu\n", FullInfo->MaxValueNameLen);
+ TRACE("MaxValueNameLen %lu\n", FullInfo->MaxValueNameLen);
if (lpcbMaxValueNameLen != NULL)
{
*lpcbMaxValueNameLen = FullInfo->MaxValueNameLen / sizeof(WCHAR) + 1;
}
- DPRINT("MaxValueDataLen %lu\n", FullInfo->MaxValueDataLen);
+ TRACE("MaxValueDataLen %lu\n", FullInfo->MaxValueDataLen);
if (lpcbMaxValueLen != NULL)
{
*lpcbMaxValueLen = FullInfo->MaxValueDataLen;
*ldwTotsize = 0;
- DPRINT ("RegQueryMultipleValuesA(%p,%p,%ld,%p,%p=%ld)\n",
+ TRACE("RegQueryMultipleValuesA(%p,%p,%ld,%p,%p=%ld)\n",
hKey, val_list, num_vals, lpValueBuf, ldwTotsize, *ldwTotsize);
for (i = 0; i < num_vals; i++)
*ldwTotsize = 0;
- DPRINT ("RegQueryMultipleValuesW(%p,%p,%ld,%p,%p=%ld)\n",
+ TRACE ("RegQueryMultipleValuesW(%p,%p,%ld,%p,%p=%ld)\n",
hKey, val_list, num_vals, lpValueBuf, ldwTotsize, *ldwTotsize);
for (i = 0; i < num_vals; i++)
LONG ErrorCode = ERROR_SUCCESS;
ULONG MaxCopy = lpcbData != NULL && lpData != NULL ? *lpcbData : 0;
- DPRINT("hKey 0x%X lpValueName %S lpData 0x%X lpcbData %d\n",
+ TRACE("hKey 0x%X lpValueName %S lpData 0x%X lpcbData %d\n",
hKey, lpValueName, lpData, lpcbData ? *lpcbData : 0);
Status = MapDefaultKey (&KeyHandle,
ValueInfo,
BufferSize,
&ResultSize);
- DPRINT("Status 0x%X\n", Status);
+ TRACE("Status 0x%X\n", Status);
if (Status == STATUS_BUFFER_OVERFLOW)
{
/* Return ERROR_SUCCESS and the buffer space needed for a successful call */
if (lpcbData != NULL)
{
*lpcbData = (ResultSize - FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[0]));
- DPRINT("(string) Returning Size: %lu\n", *lpcbData);
+ TRACE("(string) Returning Size: %lu\n", *lpcbData);
}
}
else
if (lpcbData != NULL)
{
*lpcbData = ResultSize - FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[0]);
- DPRINT("(other) Returning Size: %lu\n", *lpcbData);
+ TRACE("(other) Returning Size: %lu\n", *lpcbData);
}
}
- DPRINT("Type %d Size %d\n", ValueInfo->Type, ValueInfo->DataLength);
+ TRACE("Type %d Size %d\n", ValueInfo->Type, ValueInfo->DataLength);
RtlFreeHeap (ProcessHeap,
0,
DWORD Length;
DWORD Type;
- DPRINT("hKey 0x%X lpValueName %s lpData 0x%X lpcbData %d\n",
+ TRACE("hKey 0x%X lpValueName %s lpData 0x%X lpcbData %d\n",
hKey, lpValueName, lpData, lpcbData ? *lpcbData : 0);
if (lpData != NULL && lpcbData == NULL)
&Type,
(lpData == NULL) ? NULL : (LPBYTE)ValueData.Buffer,
&Length);
- DPRINT("ErrorCode %lu\n", ErrorCode);
+ TRACE("ErrorCode %lu\n", ErrorCode);
RtlFreeUnicodeString(&ValueName);
if (ErrorCode == ERROR_SUCCESS ||
LONG ValueSize;
LONG ErrorCode;
- DPRINT("hKey 0x%X lpSubKey %s lpValue %p lpcbValue %d\n",
+ TRACE("hKey 0x%X lpSubKey %s lpValue %p lpcbValue %d\n",
hKey, lpSubKey, lpValue, lpcbValue ? *lpcbValue : 0);
if (lpValue != NULL &&
BOOL CloseRealKey;
NTSTATUS Status;
- DPRINT("hKey 0x%X lpSubKey %S lpValue %p lpcbValue %d\n",
+ TRACE("hKey 0x%X lpSubKey %S lpValue %p lpcbValue %d\n",
hKey, lpSubKey, lpValue, lpcbValue ? *lpcbValue : 0);
Status = MapDefaultKey (&KeyHandle,