From 46940ac99edce4d2b4203aa558047e61d78e9e0c Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Thu, 11 Aug 2005 10:29:03 +0000 Subject: [PATCH] Remove unneeded wine/library.h include. Use lstrlenW() instead of the Wine-specific strlenW(). This also lets us get rid of the wine/unicode.h include. Define the InitializeObjectAttributes() macro if not using Wine's winternl.h header. --- dlls/ntdll/tests/reg.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 29cca6fc071..c94748a45b2 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -24,12 +24,10 @@ #include "ntdll_test.h" #include "winternl.h" -#include "wine/library.h" #include "stdio.h" #include "winnt.h" #include "winnls.h" #include "stdlib.h" -#include "wine/unicode.h" #ifndef __WINE_WINTERNL_H @@ -69,6 +67,16 @@ typedef struct _RTL_QUERY_REGISTRY_TABLE { ULONG DefaultLength; } RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE; +#define InitializeObjectAttributes(p,n,a,r,s) \ + do { \ + (p)->Length = sizeof(OBJECT_ATTRIBUTES); \ + (p)->RootDirectory = r; \ + (p)->Attributes = a; \ + (p)->ObjectName = n; \ + (p)->SecurityDescriptor = s; \ + (p)->SecurityQualityOfService = NULL; \ + } while (0) + #endif static NTSTATUS (WINAPI * pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING, LPCSTR); @@ -151,7 +159,7 @@ static NTSTATUS WINAPI QueryRoutine (IN PCWSTR ValueName, IN ULONG ValueType, IN if(ValueName) { - ValueNameLength = strlenW(ValueName); + ValueNameLength = lstrlenW(ValueName); ValName = (LPSTR)pRtlAllocateHeap(GetProcessHeap(), 0, ValueNameLength);