From 5cff5038a9fa1910d14984c40bd02ec8aa36afde Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Wed, 8 Nov 2006 01:20:40 +0100 Subject: [PATCH] Fix ntsecapi.h so it does not depend on winternl.h. --- dlls/advapi32/tests/lsa.c | 1 - dlls/advapi32/tests/security.c | 1 - dlls/netapi32/access.c | 1 - dlls/netapi32/ds.c | 1 - dlls/netapi32/local_group.c | 1 - dlls/netapi32/wksta.c | 1 - include/ntsecapi.h | 30 ++++++++++++++++++++++++++++++ include/sspi.h | 11 +++++++++++ include/winternl.h | 9 +++++++++ 9 files changed, 50 insertions(+), 6 deletions(-) diff --git a/dlls/advapi32/tests/lsa.c b/dlls/advapi32/tests/lsa.c index e832a2ac62e..2daf65d06b3 100644 --- a/dlls/advapi32/tests/lsa.c +++ b/dlls/advapi32/tests/lsa.c @@ -26,7 +26,6 @@ #include "windef.h" #include "winbase.h" #include "winreg.h" -#include "winternl.h" #include "ntsecapi.h" #include "sddl.h" #include "winnls.h" diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index 452f0d22f20..64198641a30 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -28,7 +28,6 @@ #include "winerror.h" #include "aclapi.h" #include "winnt.h" -#include "winternl.h" #include "sddl.h" #include "ntsecapi.h" diff --git a/dlls/netapi32/access.c b/dlls/netapi32/access.c index 4e3e65b979c..b9155e55d3a 100644 --- a/dlls/netapi32/access.c +++ b/dlls/netapi32/access.c @@ -30,7 +30,6 @@ #include "lmapibuf.h" #include "lmerr.h" #include "winreg.h" -#include "winternl.h" #include "ntsecapi.h" #include "netapi32_misc.h" #include "wine/debug.h" diff --git a/dlls/netapi32/ds.c b/dlls/netapi32/ds.c index 5c6713dca5b..33aa1e01fee 100644 --- a/dlls/netapi32/ds.c +++ b/dlls/netapi32/ds.c @@ -25,7 +25,6 @@ #include "windef.h" #include "winbase.h" #include "winerror.h" -#include "winternl.h" #include "ntsecapi.h" #include "wine/debug.h" #include "dsrole.h" diff --git a/dlls/netapi32/local_group.c b/dlls/netapi32/local_group.c index bb0b7aa43e6..68534ac6ccc 100644 --- a/dlls/netapi32/local_group.c +++ b/dlls/netapi32/local_group.c @@ -30,7 +30,6 @@ #include "lmapibuf.h" #include "lmerr.h" #include "winreg.h" -#include "winternl.h" #include "ntsecapi.h" #include "netapi32_misc.h" #include "wine/debug.h" diff --git a/dlls/netapi32/wksta.c b/dlls/netapi32/wksta.c index d89cd1a91ad..5774344008a 100644 --- a/dlls/netapi32/wksta.c +++ b/dlls/netapi32/wksta.c @@ -36,7 +36,6 @@ #include "iphlpapi.h" #include "winerror.h" #include "winreg.h" -#include "winternl.h" #include "ntsecapi.h" #include "netbios.h" #include "wine/debug.h" diff --git a/include/ntsecapi.h b/include/ntsecapi.h index 4ed878e0790..8ef61674e3f 100644 --- a/include/ntsecapi.h +++ b/include/ntsecapi.h @@ -135,6 +135,36 @@ typedef enum _POLICY_AUDIT_EVENT_TYPE AuditCategoryAccountManagement } POLICY_AUDIT_EVENT_TYPE, *PPOLICY_AUDIT_EVENT_TYPE; +#ifndef __STRING_DEFINED__ +#define __STRING_DEFINED__ +typedef struct _STRING { + USHORT Length; + USHORT MaximumLength; + PCHAR Buffer; +} STRING, *PSTRING; +#endif + +#ifndef __UNICODE_STRING_DEFINED__ +#define __UNICODE_STRING_DEFINED__ +typedef struct _UNICODE_STRING { + USHORT Length; /* bytes */ + USHORT MaximumLength; /* bytes */ + PWSTR Buffer; +} UNICODE_STRING, *PUNICODE_STRING; +#endif + +#ifndef __OBJECT_ATTRIBUTES_DEFINED__ +#define __OBJECT_ATTRIBUTES_DEFINED__ +typedef struct _OBJECT_ATTRIBUTES { + ULONG Length; + HANDLE RootDirectory; + PUNICODE_STRING ObjectName; + ULONG Attributes; + PVOID SecurityDescriptor; /* type SECURITY_DESCRIPTOR */ + PVOID SecurityQualityOfService; /* type SECURITY_QUALITY_OF_SERVICE */ +} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES; +#endif + typedef UNICODE_STRING LSA_UNICODE_STRING, *PLSA_UNICODE_STRING; typedef STRING LSA_STRING, *PLSA_STRING; typedef OBJECT_ATTRIBUTES LSA_OBJECT_ATTRIBUTES, *PLSA_OBJECT_ATTRIBUTES; diff --git a/include/sspi.h b/include/sspi.h index e743d9995b5..1a4ce525e53 100644 --- a/include/sspi.h +++ b/include/sspi.h @@ -73,6 +73,17 @@ typedef struct _SECURITY_INTEGER } SECURITY_INTEGER, *PSECURITY_INTEGER; typedef SECURITY_INTEGER TimeStamp, *PTimeStamp; +#ifndef __UNICODE_STRING_DEFINED__ +#define __UNICODE_STRING_DEFINED__ +typedef struct _UNICODE_STRING { + USHORT Length; /* bytes */ + USHORT MaximumLength; /* bytes */ + PWSTR Buffer; +} UNICODE_STRING, *PUNICODE_STRING; +#endif + +typedef UNICODE_STRING SECURITY_STRING, *PSECURITY_STRING; + typedef struct _SecPkgInfoA { unsigned long fCapabilities; diff --git a/include/winternl.h b/include/winternl.h index 75557dc797a..95091768f92 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -42,11 +42,14 @@ typedef CONST char *PCSZ; typedef short CSHORT; typedef CSHORT *PCSHORT; +#ifndef __STRING_DEFINED__ +#define __STRING_DEFINED__ typedef struct _STRING { USHORT Length; USHORT MaximumLength; PCHAR Buffer; } STRING, *PSTRING; +#endif typedef STRING ANSI_STRING; typedef PSTRING PANSI_STRING; @@ -56,11 +59,14 @@ typedef STRING OEM_STRING; typedef PSTRING POEM_STRING; typedef const STRING *PCOEM_STRING; +#ifndef __UNICODE_STRING_DEFINED__ +#define __UNICODE_STRING_DEFINED__ typedef struct _UNICODE_STRING { USHORT Length; /* bytes */ USHORT MaximumLength; /* bytes */ PWSTR Buffer; } UNICODE_STRING, *PUNICODE_STRING; +#endif typedef const UNICODE_STRING *PCUNICODE_STRING; @@ -919,6 +925,8 @@ typedef struct _KEY_VALUE_PARTIAL_INFORMATION { UCHAR Data[1]; } KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION; +#ifndef __OBJECT_ATTRIBUTES_DEFINED__ +#define __OBJECT_ATTRIBUTES_DEFINED__ typedef struct _OBJECT_ATTRIBUTES { ULONG Length; HANDLE RootDirectory; @@ -927,6 +935,7 @@ typedef struct _OBJECT_ATTRIBUTES { PVOID SecurityDescriptor; /* type SECURITY_DESCRIPTOR */ PVOID SecurityQualityOfService; /* type SECURITY_QUALITY_OF_SERVICE */ } OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES; +#endif typedef struct _OBJECT_DATA_INFORMATION { BOOLEAN InheritHandle; -- 2.11.4.GIT