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.
This commit is contained in:
Francois Gouget 2005-08-11 10:29:03 +00:00 committed by Alexandre Julliard
parent d05532e2d6
commit 46940ac99e
1 changed files with 11 additions and 3 deletions

View File

@ -24,12 +24,10 @@
#include "ntdll_test.h" #include "ntdll_test.h"
#include "winternl.h" #include "winternl.h"
#include "wine/library.h"
#include "stdio.h" #include "stdio.h"
#include "winnt.h" #include "winnt.h"
#include "winnls.h" #include "winnls.h"
#include "stdlib.h" #include "stdlib.h"
#include "wine/unicode.h"
#ifndef __WINE_WINTERNL_H #ifndef __WINE_WINTERNL_H
@ -69,6 +67,16 @@ typedef struct _RTL_QUERY_REGISTRY_TABLE {
ULONG DefaultLength; ULONG DefaultLength;
} RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE; } 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 #endif
static NTSTATUS (WINAPI * pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING, LPCSTR); static NTSTATUS (WINAPI * pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING, LPCSTR);
@ -151,7 +159,7 @@ static NTSTATUS WINAPI QueryRoutine (IN PCWSTR ValueName, IN ULONG ValueType, IN
if(ValueName) if(ValueName)
{ {
ValueNameLength = strlenW(ValueName); ValueNameLength = lstrlenW(ValueName);
ValName = (LPSTR)pRtlAllocateHeap(GetProcessHeap(), 0, ValueNameLength); ValName = (LPSTR)pRtlAllocateHeap(GetProcessHeap(), 0, ValueNameLength);