mirror of
https://github.com/reactos/reactos.git
synced 2024-08-20 18:35:32 +00:00
Added protection against inclusion of conflicting prototypes.
svn path=/trunk/; revision=2002
This commit is contained in:
parent
a4356344c9
commit
1dfc10a465
|
@ -1,19 +1,6 @@
|
|||
#ifndef __INCLUDE_DDK_LDRFUNCS_H
|
||||
#define __INCLUDE_DDK_LDRFUNCS_H
|
||||
/* $Id: ldrfuncs.h,v 1.2 2000/08/28 21:45:08 ekohl Exp $ */
|
||||
|
||||
typedef struct _LDR_RESOURCE_INFO
|
||||
{
|
||||
ULONG Type;
|
||||
ULONG Name;
|
||||
ULONG Language;
|
||||
} LDR_RESOURCE_INFO, *PLDR_RESOURCE_INFO;
|
||||
|
||||
#define RESOURCE_TYPE_LEVEL 0
|
||||
#define RESOURCE_NAME_LEVEL 1
|
||||
#define RESOURCE_LANGUAGE_LEVEL 2
|
||||
#define RESOURCE_DATA_LEVEL 3
|
||||
|
||||
/* $Id: ldrfuncs.h,v 1.3 2001/06/22 12:39:47 ekohl Exp $ */
|
||||
|
||||
NTSTATUS STDCALL
|
||||
LdrAccessResource(IN PVOID BaseAddress,
|
||||
|
|
17
reactos/include/ddk/ldrtypes.h
Normal file
17
reactos/include/ddk/ldrtypes.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef __INCLUDE_DDK_LDRTYPES_H
|
||||
#define __INCLUDE_DDK_LDRTYPES_H
|
||||
/* $Id: ldrtypes.h,v 1.1 2001/06/22 12:39:47 ekohl Exp $ */
|
||||
|
||||
typedef struct _LDR_RESOURCE_INFO
|
||||
{
|
||||
ULONG Type;
|
||||
ULONG Name;
|
||||
ULONG Language;
|
||||
} LDR_RESOURCE_INFO, *PLDR_RESOURCE_INFO;
|
||||
|
||||
#define RESOURCE_TYPE_LEVEL 0
|
||||
#define RESOURCE_NAME_LEVEL 1
|
||||
#define RESOURCE_LANGUAGE_LEVEL 2
|
||||
#define RESOURCE_DATA_LEVEL 3
|
||||
|
||||
#endif /* __INCLUDE_DDK_LDRTYPES_H */
|
|
@ -1,33 +1,23 @@
|
|||
#ifndef _INCLUDE_DDK_MMFUNCS_H
|
||||
#define _INCLUDE_DDK_MMFUNCS_H
|
||||
/* $Id: mmfuncs.h,v 1.9 2001/03/31 16:02:07 phreak Exp $ */
|
||||
/* $Id: mmfuncs.h,v 1.10 2001/06/22 12:39:47 ekohl Exp $ */
|
||||
/* MEMORY MANAGMENT ******************************************************/
|
||||
|
||||
#include <ddk/i386/pagesize.h>
|
||||
|
||||
#define PAGE_ROUND_UP(x) ( (((ULONG)x)%PAGESIZE) ? ((((ULONG)x)&(~0xfff))+0x1000) : ((ULONG)x) )
|
||||
#define PAGE_ROUND_DOWN(x) (((ULONG)x)&(~0xfff))
|
||||
#ifdef __NTOSKRNL__
|
||||
extern PVOID EXPORTED MmUserProbeAddress;
|
||||
extern PVOID EXPORTED MmHighestUserAddress;
|
||||
#else
|
||||
extern PVOID IMPORTED MmUserProbeAddress;
|
||||
extern PVOID IMPORTED MmHighestUserAddress;
|
||||
#endif
|
||||
|
||||
#ifdef __NTOSKRNL__
|
||||
extern POBJECT_TYPE EXPORTED MmSectionObjectType;
|
||||
#else
|
||||
extern POBJECT_TYPE IMPORTED MmSectionObjectType;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* FUNCTION: Determines if the given virtual address is page aligned
|
||||
*/
|
||||
#define IS_PAGE_ALIGNED(Va) (((ULONG)Va)&0xfff)
|
||||
|
||||
/*
|
||||
* PURPOSE: Returns the byte offset of a field within a structure
|
||||
*/
|
||||
#define FIELD_OFFSET(Type,Field) (LONG)(&(((Type *)(0))->Field))
|
||||
|
||||
/*
|
||||
* PURPOSE: Returns the base address structure if the caller knows the
|
||||
* address of a field within the structure
|
||||
* ARGUMENTS:
|
||||
* Address = address of the field
|
||||
* Type = Type of the whole structure
|
||||
* Field = Name of the field whose address is none
|
||||
*/
|
||||
#define CONTAINING_RECORD(Address,Type,Field) (Type *)(((LONG)Address) - FIELD_OFFSET(Type,Field))
|
||||
|
||||
/*
|
||||
* FUNCTION: Returns the number of pages spanned by an address range
|
||||
|
@ -240,11 +230,6 @@ MmGrowKernelStack (
|
|||
DWORD Unknown0
|
||||
);
|
||||
|
||||
#ifdef __NTOSKRNL__
|
||||
extern PVOID EXPORTED MmHighestUserAddress;
|
||||
#else
|
||||
extern PVOID IMPORTED MmHighestUserAddress;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* VOID
|
||||
|
|
|
@ -1,23 +1,36 @@
|
|||
/* $Id: mmtypes.h,v 1.10 2001/06/15 11:13:08 ekohl Exp $ */
|
||||
/* $Id: mmtypes.h,v 1.11 2001/06/22 12:39:48 ekohl Exp $ */
|
||||
|
||||
#ifndef _INCLUDE_DDK_MMTYPES_H
|
||||
#define _INCLUDE_DDK_MMTYPES_H
|
||||
|
||||
#include <ddk/i386/pagesize.h>
|
||||
#include <ntos/mm.h>
|
||||
|
||||
#ifdef __NTOSKRNL__
|
||||
extern PVOID EXPORTED MmUserProbeAddress;
|
||||
extern PVOID EXPORTED MmHighestUserAddress;
|
||||
#else
|
||||
extern PVOID IMPORTED MmUserProbeAddress;
|
||||
extern PVOID IMPORTED MmHighestUserAddress;
|
||||
#endif
|
||||
|
||||
#ifdef __NTOSKRNL__
|
||||
extern POBJECT_TYPE EXPORTED MmSectionObjectType;
|
||||
#else
|
||||
extern POBJECT_TYPE IMPORTED MmSectionObjectType;
|
||||
#endif
|
||||
#define PAGE_ROUND_UP(x) ( (((ULONG)x)%PAGESIZE) ? ((((ULONG)x)&(~0xfff))+0x1000) : ((ULONG)x) )
|
||||
#define PAGE_ROUND_DOWN(x) (((ULONG)x)&(~0xfff))
|
||||
|
||||
|
||||
/*
|
||||
* FUNCTION: Determines if the given virtual address is page aligned
|
||||
*/
|
||||
#define IS_PAGE_ALIGNED(Va) (((ULONG)Va)&0xfff)
|
||||
|
||||
/*
|
||||
* PURPOSE: Returns the byte offset of a field within a structure
|
||||
*/
|
||||
#define FIELD_OFFSET(Type,Field) (LONG)(&(((Type *)(0))->Field))
|
||||
|
||||
/*
|
||||
* PURPOSE: Returns the base address structure if the caller knows the
|
||||
* address of a field within the structure
|
||||
* ARGUMENTS:
|
||||
* Address = address of the field
|
||||
* Type = Type of the whole structure
|
||||
* Field = Name of the field whose address is none
|
||||
*/
|
||||
#define CONTAINING_RECORD(Address,Type,Field) (Type *)(((LONG)Address) - FIELD_OFFSET(Type,Field))
|
||||
|
||||
|
||||
#define MDL_MAPPED_TO_SYSTEM_VA (0x1)
|
||||
#define MDL_PAGES_LOCKED (0x2)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: ntddk.h,v 1.22 2001/05/30 19:57:29 ekohl Exp $
|
||||
/* $Id: ntddk.h,v 1.23 2001/06/22 12:39:48 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -20,9 +20,11 @@ extern "C"
|
|||
/* INCLUDES ***************************************************************/
|
||||
|
||||
/* GCC can not handle __fastcall */
|
||||
#ifndef FASTCALL
|
||||
//#ifdef USE_FASTCALL
|
||||
//#define FASTCALL __attribute__((fastcall))
|
||||
//#else
|
||||
#define FASTCALL STDCALL
|
||||
#endif
|
||||
//#endif
|
||||
#define STATIC static
|
||||
|
||||
#include <ntos/types.h>
|
||||
|
@ -49,13 +51,19 @@ extern "C"
|
|||
#include <ddk/iotypes.h>
|
||||
#include <ddk/extypes.h>
|
||||
#include <ddk/pstypes.h>
|
||||
#include <ddk/ldrtypes.h>
|
||||
#include <ddk/zwtypes.h>
|
||||
#include <ddk/ioctrl.h>
|
||||
#include <ddk/rtl.h>
|
||||
#if defined(__NTOSKRNL__) || defined(__NTDRIVER__) || defined(__NTHAL__)
|
||||
#include <ddk/halddk.h>
|
||||
#endif /*__NTOSKRNL__ || __NTDRIVER__ || __NTHAL__ */
|
||||
|
||||
#include <ddk/zw.h>
|
||||
#include <ddk/dbgfuncs.h>
|
||||
#include <ddk/ldrfuncs.h>
|
||||
#include <ddk/cmfuncs.h>
|
||||
#if defined(__NTOSKRNL__) || defined(__NTDRIVER__) || defined(__NTHAL__)
|
||||
#include <ddk/exfuncs.h>
|
||||
#include <ddk/mmfuncs.h>
|
||||
#include <ddk/kdfuncs.h>
|
||||
|
@ -65,9 +73,8 @@ extern "C"
|
|||
#include <ddk/iofuncs.h>
|
||||
#include <ddk/psfuncs.h>
|
||||
#include <ddk/obfuncs.h>
|
||||
#include <ddk/dbgfuncs.h>
|
||||
#include <ddk/sefuncs.h>
|
||||
#include <ddk/ldrfuncs.h>
|
||||
#endif /*__NTOSKRNL__ || __NTDRIVER__ || __NTHAL__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: rtl.h,v 1.52 2001/05/30 19:57:29 ekohl Exp $
|
||||
/* $Id: rtl.h,v 1.53 2001/06/22 12:39:48 ekohl Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -94,7 +94,7 @@ struct _LB_RANGE
|
|||
typedef struct _RTL_NLS_DATA
|
||||
{
|
||||
USHORT CodePage;
|
||||
USHORT MaxCharacterSize;
|
||||
USHORT MaxCharacterSize; // SBCS = 1, DBCS = 2
|
||||
WCHAR DefaultCharacter;
|
||||
WCHAR char1;
|
||||
WCHAR char2;
|
||||
|
@ -2006,6 +2006,75 @@ WRITE_REGISTER_BUFFER_ULONG (
|
|||
);
|
||||
|
||||
|
||||
NTSTATUS STDCALL RtlCreateAcl(PACL Acl, ULONG AclSize, ULONG AclRevision);
|
||||
NTSTATUS STDCALL RtlQueryInformationAcl (PACL Acl, PVOID Information, ULONG InformationLength, ACL_INFORMATION_CLASS InformationClass);
|
||||
NTSTATUS STDCALL RtlSetInformationAcl (PACL Acl, PVOID Information, ULONG InformationLength, ACL_INFORMATION_CLASS InformationClass);
|
||||
BOOLEAN STDCALL RtlValidAcl (PACL Acl);
|
||||
|
||||
NTSTATUS STDCALL RtlAddAccessAllowedAce(PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid);
|
||||
NTSTATUS STDCALL RtlAddAccessDeniedAce(PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid);
|
||||
NTSTATUS STDCALL RtlAddAce(PACL Acl, ULONG Revision, ULONG StartingIndex, PACE AceList, ULONG AceListLength);
|
||||
NTSTATUS STDCALL RtlAddAuditAccessAce (PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid, BOOLEAN Success, BOOLEAN Failure);
|
||||
NTSTATUS STDCALL RtlDeleteAce(PACL Acl, ULONG AceIndex);
|
||||
BOOLEAN STDCALL RtlFirstFreeAce(PACL Acl, PACE* Ace);
|
||||
NTSTATUS STDCALL RtlGetAce(PACL Acl, ULONG AceIndex, PACE *Ace);
|
||||
|
||||
NTSTATUS STDCALL RtlAbsoluteToSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD, PSECURITY_DESCRIPTOR RelSD, PULONG BufferLength);
|
||||
NTSTATUS STDCALL RtlMakeSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD, PSECURITY_DESCRIPTOR RelSD, PULONG BufferLength);
|
||||
NTSTATUS STDCALL RtlCreateSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, ULONG Revision);
|
||||
BOOLEAN STDCALL RtlValidSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor);
|
||||
ULONG STDCALL RtlLengthSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor);
|
||||
NTSTATUS STDCALL RtlSetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, BOOLEAN DaclPresent, PACL Dacl, BOOLEAN DaclDefaulted);
|
||||
NTSTATUS STDCALL RtlGetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PBOOLEAN DaclPresent, PACL* Dacl, PBOOLEAN DaclDefauted);
|
||||
NTSTATUS STDCALL RtlSetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID Owner, BOOLEAN OwnerDefaulted);
|
||||
NTSTATUS STDCALL RtlGetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID* Owner, PBOOLEAN OwnerDefaulted);
|
||||
NTSTATUS STDCALL RtlSetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID Group, BOOLEAN GroupDefaulted);
|
||||
NTSTATUS STDCALL RtlGetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID* Group, PBOOLEAN GroupDefaulted);
|
||||
NTSTATUS STDCALL RtlGetControlSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSECURITY_DESCRIPTOR_CONTROL Control, PULONG Revision);
|
||||
NTSTATUS STDCALL RtlSetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, BOOLEAN SaclPresent, PACL Sacl, BOOLEAN SaclDefaulted);
|
||||
NTSTATUS STDCALL RtlGetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PBOOLEAN SaclPresent, PACL* Sacl, PBOOLEAN SaclDefauted);
|
||||
NTSTATUS STDCALL RtlSelfRelativeToAbsoluteSD (PSECURITY_DESCRIPTOR RelSD,
|
||||
PSECURITY_DESCRIPTOR AbsSD,
|
||||
PDWORD AbsSDSize,
|
||||
PACL Dacl,
|
||||
PDWORD DaclSize,
|
||||
PACL Sacl,
|
||||
PDWORD SaclSize,
|
||||
PSID Owner,
|
||||
PDWORD OwnerSize,
|
||||
PSID Group,
|
||||
PDWORD GroupSize);
|
||||
|
||||
NTSTATUS STDCALL RtlAllocateAndInitializeSid (PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
|
||||
UCHAR SubAuthorityCount,
|
||||
ULONG SubAuthority0,
|
||||
ULONG SubAuthority1,
|
||||
ULONG SubAuthority2,
|
||||
ULONG SubAuthority3,
|
||||
ULONG SubAuthority4,
|
||||
ULONG SubAuthority5,
|
||||
ULONG SubAuthority6,
|
||||
ULONG SubAuthority7,
|
||||
PSID *Sid);
|
||||
ULONG STDCALL RtlLengthRequiredSid (UCHAR SubAuthorityCount);
|
||||
PSID_IDENTIFIER_AUTHORITY STDCALL RtlIdentifierAuthoritySid (PSID Sid);
|
||||
NTSTATUS STDCALL RtlInitializeSid (PSID Sid, PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, UCHAR SubAuthorityCount);
|
||||
PULONG STDCALL RtlSubAuthoritySid (PSID Sid, ULONG SubAuthority);
|
||||
NTSTATUS STDCALL RtlCopySid (ULONG BufferLength, PSID Dest, PSID Src);
|
||||
BOOLEAN STDCALL RtlEqualPrefixSid (PSID Sid1, PSID Sid2);
|
||||
BOOLEAN STDCALL RtlEqualSid(PSID Sid1, PSID Sid2);
|
||||
PSID STDCALL RtlFreeSid (PSID Sid);
|
||||
ULONG STDCALL RtlLengthSid (PSID Sid);
|
||||
PULONG STDCALL RtlSubAuthoritySid (PSID Sid, ULONG SubAuthority);
|
||||
PUCHAR STDCALL RtlSubAuthorityCountSid (PSID Sid);
|
||||
BOOLEAN STDCALL RtlValidSid (PSID Sid);
|
||||
NTSTATUS STDCALL RtlConvertSidToUnicodeString (PUNICODE_STRING String, PSID Sid, BOOLEAN AllocateBuffer);
|
||||
|
||||
BOOLEAN STDCALL RtlAreAllAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess);
|
||||
BOOLEAN STDCALL RtlAreAnyAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess);
|
||||
VOID STDCALL RtlMapGenericMask (PACCESS_MASK AccessMask, PGENERIC_MAPPING GenericMapping);
|
||||
|
||||
|
||||
/* functions exported from NTOSKRNL.EXE which are considered RTL */
|
||||
|
||||
char *_itoa (int value, char *string, int radix);
|
||||
|
|
|
@ -888,6 +888,7 @@ WINBOOL STDCALL AccessCheckAndAuditAlarm(
|
|||
LPBOOL pfGenerateOnClose
|
||||
);
|
||||
|
||||
#ifndef __NTDRIVER__
|
||||
LONG
|
||||
STDCALL
|
||||
InterlockedIncrement(
|
||||
|
@ -906,12 +907,15 @@ InterlockedExchange(
|
|||
LPLONG Target,
|
||||
LONG Value
|
||||
);
|
||||
|
||||
PVOID
|
||||
STDCALL
|
||||
InterlockedCompareExchange(
|
||||
PVOID *Destination,
|
||||
PVOID Exchange,
|
||||
PVOID Comperand );
|
||||
PVOID Comperand
|
||||
);
|
||||
#endif
|
||||
|
||||
WINBOOL
|
||||
STDCALL
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: rtl.h,v 1.29 2001/06/19 15:08:12 ekohl Exp $
|
||||
/* $Id: rtl.h,v 1.30 2001/06/22 12:40:45 ekohl Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -514,6 +514,42 @@ RtlpNtSetValueKey (
|
|||
IN ULONG DataLength
|
||||
);
|
||||
|
||||
#ifndef __NTDRIVER__
|
||||
LONG
|
||||
STDCALL
|
||||
InterlockedIncrement (
|
||||
PLONG Addend
|
||||
);
|
||||
|
||||
LONG
|
||||
STDCALL
|
||||
InterlockedDecrement (
|
||||
PLONG lpAddend
|
||||
);
|
||||
|
||||
LONG
|
||||
STDCALL
|
||||
InterlockedExchange (
|
||||
PLONG Target,
|
||||
LONG Value
|
||||
);
|
||||
|
||||
PVOID
|
||||
STDCALL
|
||||
InterlockedCompareExchange (
|
||||
PVOID *Destination,
|
||||
PVOID Exchange,
|
||||
PVOID Comperand
|
||||
);
|
||||
|
||||
LONG
|
||||
STDCALL
|
||||
InterlockedExchangeAdd (
|
||||
PLONG Addend,
|
||||
LONG Increment
|
||||
);
|
||||
#endif /* __NTDRIVER__ */
|
||||
|
||||
#endif /* __INCLUDE_NTDLL_RTL_H */
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue