mirror of
https://github.com/reactos/reactos.git
synced 2025-06-03 08:20:27 +00:00
- Various Microsoft DDK/PSDK compatibility fixes and some MSVC stuff too.
- Fix PSECURITY_DESCRIPTOR_RELATIVE names.c - Don't use rtltypes.h as a replacement for normal stdlib headers. - Fix a HAL header fixme. svn path=/trunk/; revision=16744
This commit is contained in:
parent
9acecc8bdd
commit
b8f8df7565
54 changed files with 1592 additions and 1597 deletions
|
@ -24,6 +24,7 @@
|
|||
#ifndef VIDEOPRT_H
|
||||
#define VIDEOPRT_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/miniport.h>
|
||||
#include <ddk/video.h>
|
||||
|
|
|
@ -8,25 +8,20 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
/* C Headers */
|
||||
#include <stdio.h>
|
||||
|
||||
/* IFS/DDK/NDK Headers */
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntifs.h>
|
||||
#include <ndk/ntndk.h>
|
||||
|
||||
/* Internal Kernel Headers */
|
||||
//#include <internal/mm.h>
|
||||
#include <internal/mm.h>
|
||||
#include <internal/ke.h>
|
||||
|
||||
#define KPCR_BASE 0xFF000000 // HACK!
|
||||
|
||||
//Temporary hack below until ntoskrnl is on NDK
|
||||
PVOID STDCALL
|
||||
MmAllocateContiguousAlignedMemory(IN ULONG NumberOfBytes,
|
||||
IN PHYSICAL_ADDRESS LowestAcceptableAddress,
|
||||
IN PHYSICAL_ADDRESS HighestAcceptableAddress,
|
||||
IN PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL,
|
||||
IN MEMORY_CACHING_TYPE CacheType OPTIONAL,
|
||||
IN ULONG Alignment);
|
||||
/* Internal HAL Headers */
|
||||
#include "apic.h"
|
||||
#include "bus.h"
|
||||
|
|
|
@ -33,17 +33,15 @@ typedef enum _PP_NPAGED_LOOKASIDE_NUMBER
|
|||
/* TYPES *********************************************************************/
|
||||
|
||||
/* FIXME: Forced to do this for now, because of EPROCESS, will go away before 0.3.0 */
|
||||
#ifndef __NTOSKRNL__
|
||||
typedef struct _MADDRESS_SPACE
|
||||
{
|
||||
PVOID MemoryAreaRoot;
|
||||
struct _MEMORY_AREA *MemoryAreaRoot;
|
||||
FAST_MUTEX Lock;
|
||||
PVOID LowestAddress;
|
||||
struct _EPROCESS* Process;
|
||||
PUSHORT PageTableRefCountTable;
|
||||
ULONG PageTableRefCountTableSize;
|
||||
} MADDRESS_SPACE, *PMADDRESS_SPACE;
|
||||
#endif
|
||||
|
||||
typedef struct _PP_LOOKASIDE_LIST
|
||||
{
|
||||
|
|
|
@ -9,8 +9,12 @@
|
|||
#ifndef _NTNDK_
|
||||
#define _NTNDK_
|
||||
|
||||
/* C Standard Headers */
|
||||
#include <stdarg.h>
|
||||
#include <excpt.h>
|
||||
|
||||
/* Kernel-Mode NDK */
|
||||
#ifndef NTOS_MODE_USER
|
||||
/* Kernel-Mode NDK */
|
||||
#include "kdtypes.h" /* Kernel Debugger Types */
|
||||
#include "kdfuncs.h" /* Kernel Debugger Functions */
|
||||
#include "cctypes.h" /* Cache Manager Types */
|
||||
|
|
|
@ -22,13 +22,13 @@ extern NTOSAPI POBJECT_TYPE PsThreadType;
|
|||
/* CONSTANTS *****************************************************************/
|
||||
|
||||
/* These are not exposed to drivers normally */
|
||||
#ifndef _NTOS_MODE_USER
|
||||
#define JOB_OBJECT_ASSIGN_PROCESS (1)
|
||||
#define JOB_OBJECT_SET_ATTRIBUTES (2)
|
||||
#define JOB_OBJECT_QUERY (4)
|
||||
#define JOB_OBJECT_TERMINATE (8)
|
||||
#define JOB_OBJECT_SET_SECURITY_ATTRIBUTES (16)
|
||||
#define JOB_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|31)
|
||||
#ifndef NTOS_MODE_USER
|
||||
#define JOB_OBJECT_ASSIGN_PROCESS 1
|
||||
#define JOB_OBJECT_SET_ATTRIBUTES 2
|
||||
#define JOB_OBJECT_QUERY 4
|
||||
#define JOB_OBJECT_TERMINATE 8
|
||||
#define JOB_OBJECT_SET_SECURITY_ATTRIBUTES 16
|
||||
#define JOB_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|31)
|
||||
#endif
|
||||
|
||||
#define THREAD_ALERT 0x4
|
||||
|
@ -36,12 +36,12 @@ extern NTOSAPI POBJECT_TYPE PsThreadType;
|
|||
#define USER_SHARED_DATA (0x7FFE0000)
|
||||
|
||||
/* Process priority classes */
|
||||
#define PROCESS_PRIORITY_CLASS_HIGH (4) /* FIXME */
|
||||
#define PROCESS_PRIORITY_CLASS_IDLE (0) /* FIXME */
|
||||
#define PROCESS_PRIORITY_CLASS_NORMAL (2) /* FIXME */
|
||||
#define PROCESS_PRIORITY_CLASS_REALTIME (5) /* FIXME */
|
||||
#define PROCESS_PRIORITY_CLASS_BELOW_NORMAL (1) /* FIXME */
|
||||
#define PROCESS_PRIORITY_CLASS_ABOVE_NORMAL (3) /* FIXME */
|
||||
#define PROCESS_PRIORITY_CLASS_IDLE 0
|
||||
#define PROCESS_PRIORITY_CLASS_BELOW_NORMAL 1
|
||||
#define PROCESS_PRIORITY_CLASS_NORMAL 2
|
||||
#define PROCESS_PRIORITY_CLASS_ABOVE_NORMAL 3
|
||||
#define PROCESS_PRIORITY_CLASS_HIGH 4
|
||||
#define PROCESS_PRIORITY_CLASS_REALTIME 5
|
||||
|
||||
/* Global Flags */
|
||||
#define FLG_STOP_ON_EXCEPTION 0x00000001
|
||||
|
@ -75,16 +75,16 @@ extern NTOSAPI POBJECT_TYPE PsThreadType;
|
|||
/* ENUMERATIONS **************************************************************/
|
||||
|
||||
/* FUNCTION TYPES ************************************************************/
|
||||
typedef VOID (STDCALL *PPEBLOCKROUTINE)(PVOID);
|
||||
typedef VOID (NTAPI *PPEBLOCKROUTINE)(PVOID);
|
||||
|
||||
typedef NTSTATUS
|
||||
(STDCALL *PW32_PROCESS_CALLBACK)(
|
||||
(NTAPI *PW32_PROCESS_CALLBACK)(
|
||||
struct _EPROCESS *Process,
|
||||
BOOLEAN Create
|
||||
);
|
||||
|
||||
typedef NTSTATUS
|
||||
(STDCALL *PW32_THREAD_CALLBACK)(
|
||||
(NTAPI *PW32_THREAD_CALLBACK)(
|
||||
struct _ETHREAD *Thread,
|
||||
BOOLEAN Create
|
||||
);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
/* DEPENDENCIES **************************************************************/
|
||||
#include "rtltypes.h"
|
||||
#include "pstypes.h"
|
||||
#include <ddk/ntnls.h>
|
||||
#include <ntnls.h>
|
||||
|
||||
/* PROTOTYPES ****************************************************************/
|
||||
|
||||
|
@ -156,7 +156,7 @@ NTSTATUS
|
|||
STDCALL
|
||||
RtlAbsoluteToSelfRelativeSD(
|
||||
IN PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor,
|
||||
IN OUT PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSecurityDescriptor,
|
||||
IN OUT PISECURITY_DESCRIPTOR_RELATIVE SelfRelativeSecurityDescriptor,
|
||||
IN PULONG BufferLength
|
||||
);
|
||||
|
||||
|
@ -322,7 +322,7 @@ RtlCreateSecurityDescriptor(
|
|||
NTSTATUS
|
||||
STDCALL
|
||||
RtlCreateSecurityDescriptorRelative(
|
||||
PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor,
|
||||
PISECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor,
|
||||
ULONG Revision
|
||||
);
|
||||
|
||||
|
@ -460,7 +460,7 @@ RtlQueryInformationAcl(
|
|||
NTSTATUS
|
||||
STDCALL
|
||||
RtlSelfRelativeToAbsoluteSD(
|
||||
IN PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSD,
|
||||
IN PISECURITY_DESCRIPTOR_RELATIVE SelfRelativeSD,
|
||||
OUT PSECURITY_DESCRIPTOR AbsoluteSD,
|
||||
IN PULONG AbsoluteSDSize,
|
||||
IN PACL Dacl,
|
||||
|
@ -547,7 +547,7 @@ RtlSubAuthoritySid(
|
|||
BOOLEAN
|
||||
STDCALL
|
||||
RtlValidRelativeSecurityDescriptor(
|
||||
IN PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptorInput,
|
||||
IN PISECURITY_DESCRIPTOR_RELATIVE SecurityDescriptorInput,
|
||||
IN ULONG SecurityDescriptorLength,
|
||||
IN SECURITY_INFORMATION RequiredInformation
|
||||
);
|
||||
|
@ -1016,14 +1016,6 @@ RtlLookupAtomInAtomTable(
|
|||
/*
|
||||
* Memory Functions
|
||||
*/
|
||||
SIZE_T
|
||||
STDCALL
|
||||
RtlCompareMemory(
|
||||
IN const VOID *Source1,
|
||||
IN const VOID *Source2,
|
||||
IN SIZE_T Length
|
||||
);
|
||||
|
||||
VOID
|
||||
STDCALL
|
||||
RtlFillMemoryUlong(
|
||||
|
@ -1727,75 +1719,4 @@ NTSTATUS
|
|||
STDCALL
|
||||
RtlGetVersion(IN OUT PRTL_OSVERSIONINFOW lpVersionInformation);
|
||||
|
||||
/*
|
||||
* C Runtime Library Functions
|
||||
*/
|
||||
char *_itoa (int value, char *string, int radix);
|
||||
wchar_t *_itow (int value, wchar_t *string, int radix);
|
||||
int _snprintf(char * buf, size_t cnt, const char *fmt, ...);
|
||||
int _snwprintf(wchar_t *buf, size_t cnt, const wchar_t *fmt, ...);
|
||||
int _stricmp(const char *s1, const char *s2);
|
||||
char * _strlwr(char *x);
|
||||
int _strnicmp(const char *s1, const char *s2, size_t n);
|
||||
char * _strnset(char* szToFill, int szFill, size_t sizeMaxFill);
|
||||
char * _strrev(char *s);
|
||||
char * _strset(char* szToFill, int szFill);
|
||||
char * _strupr(char *x);
|
||||
int _vsnprintf(char *buf, size_t cnt, const char *fmt, va_list args);
|
||||
int _wcsicmp (const wchar_t* cs, const wchar_t* ct);
|
||||
wchar_t * _wcslwr (wchar_t *x);
|
||||
int _wcsnicmp (const wchar_t * cs,const wchar_t * ct,size_t count);
|
||||
wchar_t* _wcsnset (wchar_t* wsToFill, wchar_t wcFill, size_t sizeMaxFill);
|
||||
wchar_t * _wcsrev(wchar_t *s);
|
||||
wchar_t *_wcsupr(wchar_t *x);
|
||||
int atoi(const char *str);
|
||||
long atol(const char *str);
|
||||
int isdigit(int c);
|
||||
int isalpha(int c);
|
||||
int islower(int c);
|
||||
int isprint(int c);
|
||||
int isspace(int c);
|
||||
int isupper(int c);
|
||||
int isxdigit(int c);
|
||||
size_t mbstowcs (wchar_t *wcstr, const char *mbstr, size_t count);
|
||||
int mbtowc (wchar_t *wchar, const char *mbchar, size_t count);
|
||||
void * memchr(const void *s, int c, size_t n);
|
||||
void * memcpy(void *to, const void *from, size_t count);
|
||||
void * memmove(void *dest,const void *src, size_t count);
|
||||
void * memset(void *src, int val, size_t count);
|
||||
int rand(void);
|
||||
int sprintf(char * buf, const char *fmt, ...);
|
||||
void srand(unsigned seed);
|
||||
char * strcat(char *s, const char *append);
|
||||
char * strchr(const char *s, int c);
|
||||
int strcmp(const char *s1, const char *s2);
|
||||
char * strcpy(char *to, const char *from);
|
||||
size_t strlen(const char *str);
|
||||
char * strncat(char *dst, const char *src, size_t n);
|
||||
int strncmp(const char *s1, const char *s2, size_t n);
|
||||
char *strncpy(char *dst, const char *src, size_t n);
|
||||
char *strrchr(const char *s, int c);
|
||||
size_t strspn(const char *s1, const char *s2);
|
||||
char *strstr(const char *s, const char *find);
|
||||
int swprintf(wchar_t *buf, const wchar_t *fmt, ...);
|
||||
int tolower(int c);
|
||||
int toupper(int c);
|
||||
wchar_t towlower(wchar_t c);
|
||||
wchar_t towupper(wchar_t c);
|
||||
int vsprintf(char *buf, const char *fmt, va_list args);
|
||||
wchar_t * wcscat(wchar_t *dest, const wchar_t *src);
|
||||
wchar_t * wcschr(const wchar_t *str, wchar_t ch);
|
||||
int wcscmp(const wchar_t *cs, const wchar_t *ct);
|
||||
wchar_t* wcscpy(wchar_t* str1, const wchar_t* str2);
|
||||
size_t wcscspn(const wchar_t *str,const wchar_t *reject);
|
||||
size_t wcslen(const wchar_t *s);
|
||||
wchar_t * wcsncat(wchar_t *dest, const wchar_t *src, size_t count);
|
||||
int wcsncmp(const wchar_t *cs, const wchar_t *ct, size_t count);
|
||||
wchar_t * wcsncpy(wchar_t *dest, const wchar_t *src, size_t count);
|
||||
wchar_t * wcsrchr(const wchar_t *str, wchar_t ch);
|
||||
size_t wcsspn(const wchar_t *str,const wchar_t *accept);
|
||||
wchar_t *wcsstr(const wchar_t *s,const wchar_t *b);
|
||||
size_t wcstombs (char *mbstr, const wchar_t *wcstr, size_t count);
|
||||
int wctomb (char *mbchar, wchar_t wchar);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
#include "zwtypes.h"
|
||||
#include "excpt.h"
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
|
||||
|
@ -67,14 +68,6 @@
|
|||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ExceptionContinueExecution,
|
||||
ExceptionContinueSearch,
|
||||
ExceptionNestedException,
|
||||
ExceptionCollidedUnwind
|
||||
} EXCEPTION_DISPOSITION;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
INVALID_PATH = 0,
|
||||
|
@ -102,16 +95,16 @@ typedef EXCEPTION_DISPOSITION
|
|||
PVOID
|
||||
);
|
||||
|
||||
typedef LONG (STDCALL *PVECTORED_EXCEPTION_HANDLER)(
|
||||
typedef LONG (NTAPI *PVECTORED_EXCEPTION_HANDLER)(
|
||||
PEXCEPTION_POINTERS ExceptionPointers
|
||||
);
|
||||
|
||||
typedef DWORD (STDCALL *PTHREAD_START_ROUTINE)(
|
||||
typedef DWORD (NTAPI *PTHREAD_START_ROUTINE)(
|
||||
LPVOID Parameter
|
||||
);
|
||||
|
||||
typedef VOID
|
||||
(STDCALL *PRTL_BASE_PROCESS_START_ROUTINE)(
|
||||
(NTAPI *PRTL_BASE_PROCESS_START_ROUTINE)(
|
||||
PTHREAD_START_ROUTINE StartAddress,
|
||||
PVOID Parameter
|
||||
);
|
||||
|
@ -234,11 +227,13 @@ typedef struct _RTL_HEAP_DEFINITION
|
|||
} RTL_HEAP_DEFINITION, *PRTL_HEAP_DEFINITION;
|
||||
/* END REVIEW AREA */
|
||||
|
||||
#ifdef _INC_EXCPT
|
||||
typedef struct _EXCEPTION_REGISTRATION
|
||||
{
|
||||
struct _EXCEPTION_REGISTRATION* prev;
|
||||
PEXCEPTION_HANDLER handler;
|
||||
} EXCEPTION_REGISTRATION, *PEXCEPTION_REGISTRATION;
|
||||
#endif
|
||||
|
||||
typedef EXCEPTION_REGISTRATION EXCEPTION_REGISTRATION_RECORD;
|
||||
typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD;
|
||||
|
@ -276,7 +271,7 @@ typedef struct _RTL_RANGE
|
|||
} RTL_RANGE, *PRTL_RANGE;
|
||||
|
||||
typedef BOOLEAN
|
||||
(STDCALL *PRTL_CONFLICT_RANGE_CALLBACK) (
|
||||
(NTAPI *PRTL_CONFLICT_RANGE_CALLBACK) (
|
||||
PVOID Context,
|
||||
PRTL_RANGE Range
|
||||
);
|
||||
|
@ -357,7 +352,7 @@ typedef struct _RTL_USER_PROCESS_PARAMETERS
|
|||
ULONG CountY;
|
||||
ULONG CountCharsX;
|
||||
ULONG CountCharsY;
|
||||
ULONG FillAttribute;;
|
||||
ULONG FillAttribute;
|
||||
ULONG WindowFlags;
|
||||
ULONG ShowWindowFlags;
|
||||
UNICODE_STRING WindowTitle;
|
||||
|
@ -405,7 +400,7 @@ typedef struct _RTL_ATOM_TABLE
|
|||
} RTL_ATOM_TABLE, *PRTL_ATOM_TABLE;
|
||||
|
||||
/* Let Kernel Drivers use this */
|
||||
#ifndef _WINBASE_H
|
||||
#ifndef _WINBASE_
|
||||
typedef struct _SYSTEMTIME
|
||||
{
|
||||
WORD wYear;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -4025,7 +4025,7 @@ ZwYieldExecution(
|
|||
);
|
||||
|
||||
|
||||
static inline struct _PEB * NtCurrentPeb(void)
|
||||
static __inline struct _PEB* NtCurrentPeb (void)
|
||||
{
|
||||
struct _PEB * pPeb;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
#include "rtltypes.h"
|
||||
#include <ddk/cfg.h>
|
||||
#include <cfg.h>
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
|
||||
|
@ -820,6 +820,7 @@ typedef struct _SYSTEM_RESOURCE_LOCK_INFO
|
|||
/* Class 13 */
|
||||
typedef struct _SYSTEM_BACKTRACE_INFORMATION_ENTRY
|
||||
{
|
||||
ULONG Dummy;
|
||||
/* FIXME */
|
||||
} SYSTEM_BACKTRACE_INFORMATION_ENTRY, *PSYSTEM_BACKTRACE_INFORMATION_ENTRY;
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef NDEBUG
|
||||
#define DPRINT(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
|
||||
#define DPRINT(...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(__VA_ARGS__); } while(0);
|
||||
#define CHECKPOINT do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0);
|
||||
#else
|
||||
#ifdef __GNUC__
|
||||
|
|
|
@ -41,7 +41,8 @@
|
|||
#define SECONDS_TO_100NS(seconds) (((LONGLONG)(seconds)) * MILLIS_TO_100NS(1000))
|
||||
#define MINUTES_TO_100NS(minutes) (((LONGLONG)(minutes)) * SECONDS_TO_100NS(60))
|
||||
#define HOURS_TO_100NS(hours) (((LONGLONG)(hours)) * MINUTES_TO_100NS(60))
|
||||
#define TYPE_ALIGNMENT(t) FIELD_OFFSET(struct { char x; t test; }, test)
|
||||
#define UNICODIZE1(x) L##x
|
||||
#define UNICODIZE(x) UNICODIZE1(x)
|
||||
#define InsertAscendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\
|
||||
{\
|
||||
PLIST_ENTRY current;\
|
||||
|
|
|
@ -22,10 +22,11 @@ typedef ULONG CSR_API_NUMBER;
|
|||
|
||||
#define CSR_CSRSS_SECTION_SIZE (65536)
|
||||
|
||||
typedef __declspec(noreturn) VOID CALLBACK(*PCONTROLDISPATCHER)(DWORD);
|
||||
typedef VOID (CALLBACK *PCONTROLDISPATCHER)(DWORD);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ULONG Dummy;
|
||||
} CSRSS_CONNECT_PROCESS, *PCSRSS_CONNECT_PROCESS;
|
||||
|
||||
typedef struct
|
||||
|
@ -40,6 +41,7 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
ULONG Dummy;
|
||||
} CSRSS_TERMINATE_PROCESS, *PCSRSS_TERMINATE_PROCESS;
|
||||
|
||||
typedef struct
|
||||
|
@ -80,6 +82,7 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
ULONG Dummy;
|
||||
} CSRSS_FREE_CONSOLE, *PCSRSS_FREE_CONSOLE;
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -16,7 +16,7 @@ unsigned long DbgPrint(char *Format,...);
|
|||
#ifdef DBG
|
||||
#define DPRINT1 DbgPrint("(%s:%d:%s) ",__FILE__,__LINE__,__FUNCTION__), DbgPrint
|
||||
#else
|
||||
#define DPRINT1(args...)
|
||||
#define DPRINT1(...)
|
||||
#endif
|
||||
|
||||
#if !defined(DBG) || !defined(YDEBUG)
|
||||
|
|
|
@ -41,20 +41,20 @@
|
|||
#define WINE_UNICODE_API __attribute__((dllimport))
|
||||
#endif
|
||||
|
||||
static inline WCHAR *strpbrkW( const WCHAR *str, const WCHAR *accept )
|
||||
static __inline WCHAR *strpbrkW( const WCHAR *str, const WCHAR *accept )
|
||||
{
|
||||
for ( ; *str; str++) if (strchrW( accept, *str )) return (WCHAR *)str;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline WCHAR *memchrW( const WCHAR *ptr, WCHAR ch, size_t n )
|
||||
static __inline WCHAR *memchrW( const WCHAR *ptr, WCHAR ch, size_t n )
|
||||
{
|
||||
const WCHAR *end;
|
||||
for (end = ptr + n; ptr < end; ptr++) if (*ptr == ch) return (WCHAR *)ptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline WCHAR *memrchrW( const WCHAR *ptr, WCHAR ch, size_t n )
|
||||
static __inline WCHAR *memrchrW( const WCHAR *ptr, WCHAR ch, size_t n )
|
||||
{
|
||||
const WCHAR *end, *ret = NULL;
|
||||
for (end = ptr + n; ptr < end; ptr++) if (*ptr == ch) ret = ptr;
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
/* C Headers */
|
||||
#include <stdio.h>
|
||||
|
||||
/* PSDK/NDK Headers */
|
||||
#include <windows.h>
|
||||
#include <ntsecapi.h>
|
||||
|
|
|
@ -245,7 +245,7 @@ MakeAbsoluteSD (
|
|||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
Status = RtlSelfRelativeToAbsoluteSD ((PSECURITY_DESCRIPTOR_RELATIVE)pSelfRelativeSecurityDescriptor,
|
||||
Status = RtlSelfRelativeToAbsoluteSD ((PISECURITY_DESCRIPTOR_RELATIVE)pSelfRelativeSecurityDescriptor,
|
||||
pAbsoluteSecurityDescriptor,
|
||||
lpdwAbsoluteSecurityDescriptorSize,
|
||||
pDacl,
|
||||
|
@ -280,7 +280,7 @@ MakeSelfRelativeSD (
|
|||
NTSTATUS Status;
|
||||
|
||||
Status = RtlAbsoluteToSelfRelativeSD (pAbsoluteSecurityDescriptor,
|
||||
(PSECURITY_DESCRIPTOR_RELATIVE)pSelfRelativeSecurityDescriptor,
|
||||
(PISECURITY_DESCRIPTOR_RELATIVE)pSelfRelativeSecurityDescriptor,
|
||||
(PULONG)lpdwBufferLength);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include <ctype.h>
|
||||
#include <windows.h>
|
||||
#include <winerror.h>
|
||||
#include <windns.h>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOL WINAPI DebugBreakProcess(HANDLE Process)
|
||||
WINBASEAPI BOOL WINAPI DebugBreakProcess(HANDLE Process)
|
||||
{
|
||||
NTSTATUS nErrCode = DbgUiIssueRemoteBreakin(Process);
|
||||
|
||||
|
|
|
@ -169,8 +169,8 @@ FindNextChangeNotification (
|
|||
}
|
||||
|
||||
|
||||
extern VOID STDCALL
|
||||
(ApcRoutine)(PVOID ApcContext,
|
||||
extern VOID
|
||||
(STDCALL ApcRoutine)(PVOID ApcContext,
|
||||
struct _IO_STATUS_BLOCK* IoStatusBlock,
|
||||
ULONG Reserved);
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ GetTempPathW (
|
|||
WCHAR tmp_full_path[MAX_PATH];
|
||||
UINT ret;
|
||||
|
||||
DPRINT("GetTempPathW(%lu,%p)\n", nBufferLength, lpBuffer);
|
||||
DPRINT("GetTempPathW(%lu,%p)\n", count, path);
|
||||
|
||||
if (!(ret = GetEnvironmentVariableW( L"TMP", tmp_path, MAX_PATH )))
|
||||
if (!(ret = GetEnvironmentVariableW( L"TEMP", tmp_path, MAX_PATH )))
|
||||
|
|
|
@ -60,13 +60,8 @@ CreateIoCompletionPort(
|
|||
|
||||
if ( FileHandle != INVALID_HANDLE_VALUE )
|
||||
{
|
||||
#ifdef __USE_W32API
|
||||
CompletionInformation.Port = CompletionPort;
|
||||
CompletionInformation.Key = (PVOID)CompletionKey;
|
||||
#else
|
||||
CompletionInformation.IoCompletionHandle = CompletionPort;
|
||||
CompletionInformation.CompletionKey = CompletionKey;
|
||||
#endif
|
||||
|
||||
errCode = NtSetInformationFile(FileHandle,
|
||||
&IoStatusBlock,
|
||||
|
|
|
@ -4,14 +4,18 @@
|
|||
#define UNIMPLEMENTED DbgPrint("%s at %s:%d is unimplemented\n",__FUNCTION__,__FILE__,__LINE__);
|
||||
|
||||
#ifdef NDEBUG
|
||||
#ifdef __GNUC__
|
||||
#define DPRINT(args...)
|
||||
#else
|
||||
#define DPRINT
|
||||
#endif
|
||||
#define CHECKPOINT
|
||||
#ifdef ASSERT
|
||||
#undef ASSERT
|
||||
#endif
|
||||
#define ASSERT(x)
|
||||
#else
|
||||
#define DPRINT(args...) do { DbgPrint("(KERNEL32:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
|
||||
#define DPRINT(...) do { DbgPrint("(KERNEL32:%s:%d) ",__FILE__,__LINE__); DbgPrint(__VA_ARGS__); } while(0);
|
||||
#define CHECKPOINT do { DbgPrint("(KERNEL32:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0);
|
||||
#ifdef ASSERT
|
||||
#undef ASSERT
|
||||
|
@ -19,7 +23,7 @@
|
|||
#define ASSERT(x) do { if(!x) RtlAssert("#x", __FILE__,__LINE__, ""); } while(0);
|
||||
#endif
|
||||
|
||||
#define DPRINT1(args...) do { DbgPrint("(KERNEL32:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
|
||||
#define DPRINT1(...) do { DbgPrint("(KERNEL32:%s:%d) ",__FILE__,__LINE__); DbgPrint(__VA_ARGS__); } while(0);
|
||||
#define CHECKPOINT1 do { DbgPrint("(KERNEL32:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0);
|
||||
|
||||
#endif /* ndef _KERNEL32_INCLUDE_DEBUG_H */
|
||||
|
|
|
@ -9,20 +9,23 @@
|
|||
/* INCLUDES ******************************************************************/
|
||||
|
||||
/* PSDK/NDK Headers */
|
||||
#include <windows.h>
|
||||
#define NTOS_MODE_USER
|
||||
#define _KERNEL32_
|
||||
#define _WMIKM_
|
||||
#include <windows.h>
|
||||
#include <ndk/ntndk.h>
|
||||
|
||||
/* CSRSS Header */
|
||||
#include <csrss/csrss.h>
|
||||
|
||||
/* C Headers */
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
|
||||
/* DDK Driver Headers */
|
||||
#include <ddk/ntddbeep.h>
|
||||
#include <ddk/ntddser.h>
|
||||
#include <ddk/ntddtape.h>
|
||||
#include <ntddbeep.h>
|
||||
#include <ntddser.h>
|
||||
|
||||
/* Internal Kernel32 Header */
|
||||
#include "include/kernel32.h"
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#define REACTOS_STR_ORIGINAL_FILENAME "kernel32.dll\0"
|
||||
#include <reactos/version.rc>
|
||||
|
||||
#include "windows.h"
|
||||
#include "errcodes.rc"
|
||||
|
||||
#include "locale_rc.rc"
|
||||
|
|
|
@ -574,7 +574,7 @@ COMMDCB_PARAM_HANDLER(xon)
|
|||
/* FUNCTIONS */
|
||||
#define COMMDCB_PARAM(__P__) \
|
||||
{ \
|
||||
RTL_CONSTANT_STRING( L""#__P__ ), \
|
||||
RTL_CONSTANT_STRING(L""#__P__ ), \
|
||||
(ULONG_PTR)&COMMDCB_ ## __P__ ## Param \
|
||||
}
|
||||
|
||||
|
|
|
@ -516,13 +516,14 @@ GetConsoleFontInfo (DWORD Unknown0,
|
|||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
DWORD STDCALL
|
||||
COORD STDCALL
|
||||
GetConsoleFontSize(HANDLE hConsoleOutput,
|
||||
DWORD nFont)
|
||||
{
|
||||
COORD Empty = {0, 0};
|
||||
DPRINT1("GetConsoleFontSize(0x%x, 0x%x) UNIMPLEMENTED!\n", hConsoleOutput, nFont);
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return 0;
|
||||
return Empty ;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
/* strdup macros */
|
||||
/* DO NOT USE IT!! it will go away soon */
|
||||
inline static LPSTR HEAP_strdupWtoA( HANDLE heap, DWORD flags, LPCWSTR str )
|
||||
__inline static LPSTR HEAP_strdupWtoA( HANDLE heap, DWORD flags, LPCWSTR str )
|
||||
{
|
||||
LPSTR ret;
|
||||
INT len;
|
||||
|
|
|
@ -769,7 +769,7 @@ GetLocaleInfoW (
|
|||
*
|
||||
* Retrieve the ANSI codepage for a given locale.
|
||||
*/
|
||||
inline static UINT get_lcid_codepage( LCID lcid )
|
||||
__inline static UINT get_lcid_codepage( LCID lcid )
|
||||
{
|
||||
UINT ret;
|
||||
if (!GetLocaleInfoW( lcid, LOCALE_IDEFAULTANSICODEPAGE|LOCALE_RETURN_NUMBER, (WCHAR *)&ret,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $Id$
|
||||
*
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <k32.h>
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -879,7 +879,7 @@ GetOEMCP (VOID)
|
|||
return OemCodePage.CodePageTable.CodePage;
|
||||
}
|
||||
|
||||
static inline BOOL
|
||||
static __inline BOOL
|
||||
IntIsLeadByte(PCPTABLEINFO TableInfo, UCHAR Ch)
|
||||
{
|
||||
if(TableInfo->MaximumCharacterSize == 2)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <k32.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include "debug.h"
|
||||
#include "../include/debug.h"
|
||||
|
||||
|
||||
static const char bom_utf8[] = {0xEF,0xBB,0xBF};
|
||||
|
@ -84,7 +84,7 @@ static RTL_CRITICAL_SECTION PROFILE_CritSect = { &critsect_debug, -1, 0, 0, 0, 0
|
|||
static const char hex[16] = "0123456789ABCDEF";
|
||||
|
||||
|
||||
static inline WCHAR *memchrW( const WCHAR *ptr, WCHAR ch, size_t n )
|
||||
static __inline WCHAR *memchrW( const WCHAR *ptr, WCHAR ch, size_t n )
|
||||
{
|
||||
const WCHAR *end;
|
||||
for (end = ptr + n; ptr < end; ptr++)
|
||||
|
@ -93,7 +93,7 @@ static inline WCHAR *memchrW( const WCHAR *ptr, WCHAR ch, size_t n )
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static inline WCHAR *memrchrW( const WCHAR *ptr, WCHAR ch, size_t n )
|
||||
static __inline WCHAR *memrchrW( const WCHAR *ptr, WCHAR ch, size_t n )
|
||||
{
|
||||
const WCHAR *end, *ret = NULL;
|
||||
for (end = ptr + n; ptr < end; ptr++)
|
||||
|
@ -129,7 +129,7 @@ static void PROFILE_CopyEntry( LPWSTR buffer, LPCWSTR value, int len,
|
|||
|
||||
|
||||
/* byte-swaps shorts in-place in a buffer. len is in WCHARs */
|
||||
static inline void PROFILE_ByteSwapShortBuffer(WCHAR * buffer, int len)
|
||||
static __inline void PROFILE_ByteSwapShortBuffer(WCHAR * buffer, int len)
|
||||
{
|
||||
int i;
|
||||
USHORT * shortbuffer = (USHORT *)buffer;
|
||||
|
@ -139,7 +139,7 @@ static inline void PROFILE_ByteSwapShortBuffer(WCHAR * buffer, int len)
|
|||
|
||||
|
||||
/* writes any necessary encoding marker to the file */
|
||||
static inline void PROFILE_WriteMarker(HANDLE hFile, ENCODING encoding)
|
||||
static __inline void PROFILE_WriteMarker(HANDLE hFile, ENCODING encoding)
|
||||
{
|
||||
DWORD dwBytesWritten;
|
||||
DWORD bom;
|
||||
|
@ -288,7 +288,7 @@ static void PROFILE_Free( PROFILESECTION *section )
|
|||
|
||||
|
||||
/* returns 1 if a character white space else 0 */
|
||||
static inline int PROFILE_isspaceW(WCHAR c)
|
||||
static __inline int PROFILE_isspaceW(WCHAR c)
|
||||
{
|
||||
if (iswspace(c))
|
||||
return 1;
|
||||
|
@ -299,7 +299,7 @@ static inline int PROFILE_isspaceW(WCHAR c)
|
|||
}
|
||||
|
||||
|
||||
static inline ENCODING PROFILE_DetectTextEncoding(const void * buffer, int * len)
|
||||
static __inline ENCODING PROFILE_DetectTextEncoding(const void * buffer, int * len)
|
||||
{
|
||||
DWORD flags = IS_TEXT_UNICODE_SIGNATURE |
|
||||
IS_TEXT_UNICODE_REVERSE_SIGNATURE |
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include <k32.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include "../include/debug.h"
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@ GetVersion(VOID)
|
|||
return nVersion;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
@ -83,7 +82,7 @@ GetVersionExW(
|
|||
PWCHAR szVer = lpVersionInformation->szCSDVersion + ln;
|
||||
RtlZeroMemory(szVer, (maxlen - ln + 1) * sizeof(WCHAR));
|
||||
wcsncpy(szVer,
|
||||
L"ReactOS " KERNEL_VERSION_STR L" (Build " KERNEL_VERSION_BUILD_STR L")",
|
||||
L"ReactOS " UNICODIZE(KERNEL_VERSION_STR) L" (Build " UNICODIZE(KERNEL_VERSION_BUILD_STR) L")",
|
||||
maxlen - ln);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <windows.h>
|
||||
#include "regtests.h"
|
||||
#include <k32.h>
|
||||
|
||||
int
|
||||
mainCRTStartup(int argc, char *argv[])
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "../../k32.h"
|
||||
#include "regtests.h"
|
||||
#include <k32.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#include "regtests.h"
|
||||
#define NDEBUG
|
||||
#include "../../include/debug.h"
|
||||
|
||||
|
@ -124,3 +125,5 @@ static void RunTest()
|
|||
}
|
||||
|
||||
_Dispatcher(CreatefileTest, "CreateFileW")
|
||||
|
||||
#endif
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
/* C Headers */
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
/* SDK/DDK/NDK Headers. */
|
||||
#include <windows.h>
|
||||
#define NTOS_MODE_USER
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
/* C Headers */
|
||||
#include <stdio.h>
|
||||
|
||||
/* PSDK/NDK Headers */
|
||||
#include <windows.h>
|
||||
#define NTOS_MODE_USER
|
||||
|
|
|
@ -28,7 +28,7 @@ RtlpQuerySecurityDescriptorPointers(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
{
|
||||
if (SecurityDescriptor->Control & SE_SELF_RELATIVE)
|
||||
{
|
||||
PSECURITY_DESCRIPTOR_RELATIVE RelSD = (PSECURITY_DESCRIPTOR_RELATIVE)SecurityDescriptor;
|
||||
PISECURITY_DESCRIPTOR_RELATIVE RelSD = (PISECURITY_DESCRIPTOR_RELATIVE)SecurityDescriptor;
|
||||
if(Owner != NULL)
|
||||
{
|
||||
*Owner = ((RelSD->Owner != 0) ? (PSID)((ULONG_PTR)RelSD + RelSD->Owner) : NULL);
|
||||
|
@ -134,7 +134,7 @@ RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
|
||||
|
||||
NTSTATUS STDCALL
|
||||
RtlCreateSecurityDescriptorRelative (PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor,
|
||||
RtlCreateSecurityDescriptorRelative (PISECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor,
|
||||
ULONG Revision)
|
||||
{
|
||||
PAGED_CODE_RTL();
|
||||
|
@ -429,7 +429,7 @@ RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
*/
|
||||
NTSTATUS STDCALL
|
||||
RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR AbsSD,
|
||||
PSECURITY_DESCRIPTOR_RELATIVE RelSD,
|
||||
PISECURITY_DESCRIPTOR_RELATIVE RelSD,
|
||||
PULONG BufferLength)
|
||||
{
|
||||
PSID Owner;
|
||||
|
@ -514,7 +514,7 @@ RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR AbsSD,
|
|||
*/
|
||||
NTSTATUS STDCALL
|
||||
RtlAbsoluteToSelfRelativeSD(PSECURITY_DESCRIPTOR AbsSD,
|
||||
PSECURITY_DESCRIPTOR_RELATIVE RelSD,
|
||||
PISECURITY_DESCRIPTOR_RELATIVE RelSD,
|
||||
PULONG BufferLength)
|
||||
{
|
||||
PAGED_CODE_RTL();
|
||||
|
@ -655,7 +655,7 @@ RtlSetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
* @implemented
|
||||
*/
|
||||
NTSTATUS STDCALL
|
||||
RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR_RELATIVE RelSD,
|
||||
RtlSelfRelativeToAbsoluteSD(PISECURITY_DESCRIPTOR_RELATIVE RelSD,
|
||||
PSECURITY_DESCRIPTOR AbsSD,
|
||||
PDWORD AbsSDSize,
|
||||
PACL Dacl,
|
||||
|
@ -732,7 +732,7 @@ RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR_RELATIVE RelSD,
|
|||
* @unimplemented
|
||||
*/
|
||||
NTSTATUS STDCALL
|
||||
RtlSelfRelativeToAbsoluteSD2(PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSecurityDescriptor,
|
||||
RtlSelfRelativeToAbsoluteSD2(PISECURITY_DESCRIPTOR_RELATIVE SelfRelativeSecurityDescriptor,
|
||||
PULONG BufferSize)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
|
@ -744,7 +744,7 @@ RtlSelfRelativeToAbsoluteSD2(PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSecurityD
|
|||
* @implemented
|
||||
*/
|
||||
BOOLEAN STDCALL
|
||||
RtlValidRelativeSecurityDescriptor(IN PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptorInput,
|
||||
RtlValidRelativeSecurityDescriptor(IN PISECURITY_DESCRIPTOR_RELATIVE SecurityDescriptorInput,
|
||||
IN ULONG SecurityDescriptorLength,
|
||||
IN SECURITY_INFORMATION RequiredInformation)
|
||||
{
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#define NTOS_MODE_USER
|
||||
#include <ndk/ntndk.h>
|
||||
|
|
|
@ -176,6 +176,7 @@ typedef struct _MEMORY_AREA
|
|||
} Data;
|
||||
} MEMORY_AREA, *PMEMORY_AREA;
|
||||
|
||||
#ifndef _MMTYPES_H
|
||||
typedef struct _MADDRESS_SPACE
|
||||
{
|
||||
PMEMORY_AREA MemoryAreaRoot;
|
||||
|
@ -185,6 +186,7 @@ typedef struct _MADDRESS_SPACE
|
|||
PUSHORT PageTableRefCountTable;
|
||||
ULONG PageTableRefCountTableSize;
|
||||
} MADDRESS_SPACE, *PMADDRESS_SPACE;
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
@ -11,9 +11,6 @@
|
|||
/* We are the Kernel */
|
||||
#define NTKERNELAPI
|
||||
|
||||
/* include the ntoskrnl config.h file */
|
||||
#include "config.h"
|
||||
|
||||
/* DDK/IFS/NDK Headers */
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntifs.h>
|
||||
|
@ -37,6 +34,8 @@
|
|||
#include <diskdump/diskdump.h>
|
||||
|
||||
/* C Headers */
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <malloc.h>
|
||||
#include <wchar.h>
|
||||
|
||||
|
@ -48,3 +47,4 @@
|
|||
|
||||
/* Internal Headers */
|
||||
#include "internal/ntoskrnl.h"
|
||||
#include "config.h"
|
||||
|
|
|
@ -404,7 +404,7 @@ SeCaptureSecurityDescriptor(
|
|||
sizeof(ULONG));
|
||||
if(DescriptorCopy.Control & SE_SELF_RELATIVE)
|
||||
{
|
||||
PSECURITY_DESCRIPTOR_RELATIVE RelSD = (PSECURITY_DESCRIPTOR_RELATIVE)OriginalSecurityDescriptor;
|
||||
PISECURITY_DESCRIPTOR_RELATIVE RelSD = (PISECURITY_DESCRIPTOR_RELATIVE)OriginalSecurityDescriptor;
|
||||
|
||||
DescriptorCopy.Owner = (PSID)RelSD->Owner;
|
||||
DescriptorCopy.Group = (PSID)RelSD->Group;
|
||||
|
@ -455,7 +455,7 @@ SeCaptureSecurityDescriptor(
|
|||
sizeof(SECURITY_DESCRIPTOR_RELATIVE) : sizeof(SECURITY_DESCRIPTOR));
|
||||
if(DescriptorCopy.Control & SE_SELF_RELATIVE)
|
||||
{
|
||||
PSECURITY_DESCRIPTOR_RELATIVE RelSD = (PSECURITY_DESCRIPTOR_RELATIVE)OriginalSecurityDescriptor;
|
||||
PISECURITY_DESCRIPTOR_RELATIVE RelSD = (PISECURITY_DESCRIPTOR_RELATIVE)OriginalSecurityDescriptor;
|
||||
|
||||
DescriptorCopy.Owner = (PSID)RelSD->Owner;
|
||||
DescriptorCopy.Group = (PSID)RelSD->Group;
|
||||
|
@ -675,7 +675,7 @@ SeQuerySecurityDescriptorInfo(IN PSECURITY_INFORMATION SecurityInformation,
|
|||
IN PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor OPTIONAL)
|
||||
{
|
||||
PSECURITY_DESCRIPTOR ObjectSd;
|
||||
PSECURITY_DESCRIPTOR_RELATIVE RelSD;
|
||||
PISECURITY_DESCRIPTOR_RELATIVE RelSD;
|
||||
PSID Owner = NULL;
|
||||
PSID Group = NULL;
|
||||
PACL Dacl = NULL;
|
||||
|
@ -688,7 +688,7 @@ SeQuerySecurityDescriptorInfo(IN PSECURITY_INFORMATION SecurityInformation,
|
|||
ULONG_PTR Current;
|
||||
ULONG SdLength;
|
||||
|
||||
RelSD = (PSECURITY_DESCRIPTOR_RELATIVE)SecurityDescriptor;
|
||||
RelSD = (PISECURITY_DESCRIPTOR_RELATIVE)SecurityDescriptor;
|
||||
|
||||
if (*ObjectsSecurityDescriptor == NULL)
|
||||
{
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#define UNICODE
|
||||
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#define NTOS_MODE_USER
|
||||
#include <ndk/ntndk.h>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/* PSDK/NDK Headers */
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#define NTOS_MODE_USER
|
||||
#include <ndk/ntndk.h>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef _SMSS_H_INCLUDED_
|
||||
#define _SMSS_H_INCLUDED_
|
||||
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#define NTOS_MODE_USER
|
||||
#include <ndk/ntndk.h>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#define NTOS_MODE_USER
|
||||
#include <ndk/ntndk.h>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#define NTOS_MODE_USER
|
||||
#include <ndk/ntndk.h>
|
||||
|
|
|
@ -3442,7 +3442,7 @@ NTSTATUS
|
|||
NTAPI
|
||||
RtlAbsoluteToSelfRelativeSD (
|
||||
IN PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor,
|
||||
IN OUT PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSecurityDescriptor,
|
||||
IN OUT PISECURITY_DESCRIPTOR_RELATIVE SelfRelativeSecurityDescriptor,
|
||||
IN PULONG BufferLength
|
||||
);
|
||||
|
||||
|
|
|
@ -5640,7 +5640,7 @@ NTOSAPI
|
|||
BOOLEAN
|
||||
DDKAPI
|
||||
RtlValidRelativeSecurityDescriptor(
|
||||
IN PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptorInput,
|
||||
IN PISECURITY_DESCRIPTOR_RELATIVE SecurityDescriptorInput,
|
||||
IN ULONG SecurityDescriptorLength,
|
||||
IN SECURITY_INFORMATION RequiredInformation);
|
||||
|
||||
|
|
|
@ -72,4 +72,5 @@ typedef struct _OBJECT_ATTRIBUTES {
|
|||
#endif
|
||||
#define NOTHING
|
||||
#define RTL_CONSTANT_STRING(s) { sizeof(s)-sizeof((s)[0]), sizeof(s), s }
|
||||
#define TYPE_ALIGNMENT( t ) FIELD_OFFSET( struct { char x; t test; }, test )
|
||||
#endif /* _NTDEF_H */
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
#ifndef _WINBASE_H
|
||||
#define _WINBASE_H
|
||||
#ifndef _WINBASE_
|
||||
#define _WINBASE_
|
||||
#if __GNUC__ >= 3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifndef WINBASEAPI
|
||||
#if !defined(_KERNEL32_)
|
||||
#define WINBASEAPI DECLSPEC_IMPORT
|
||||
#else
|
||||
#define WINBASEAPI
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include <winresrc.h>
|
||||
#else
|
||||
|
||||
#include <excpt.h>
|
||||
#include <stdarg.h>
|
||||
#include <windef.h>
|
||||
#include <wincon.h>
|
||||
|
|
|
@ -399,6 +399,7 @@ typedef DWORD FLONG;
|
|||
* a SID_IDENTIFIER_AUTHORITY, eg.
|
||||
* SID_IDENTIFIER_AUTHORITY aNullSidAuthority = {SECURITY_NULL_SID_AUTHORITY};
|
||||
*/
|
||||
#define SID_MAX_SUB_AUTHORITIES 15
|
||||
#define SECURITY_NULL_SID_AUTHORITY {0,0,0,0,0,0}
|
||||
#define SECURITY_WORLD_SID_AUTHORITY {0,0,0,0,0,1}
|
||||
#define SECURITY_LOCAL_SID_AUTHORITY {0,0,0,0,0,2}
|
||||
|
@ -2170,14 +2171,14 @@ typedef struct _SECURITY_DESCRIPTOR {
|
|||
PACL Dacl;
|
||||
} SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR;
|
||||
typedef struct _SECURITY_DESCRIPTOR_RELATIVE {
|
||||
UCHAR Revision;
|
||||
UCHAR Sbz1;
|
||||
SECURITY_DESCRIPTOR_CONTROL Control;
|
||||
ULONG Owner;
|
||||
ULONG Group;
|
||||
ULONG Sacl;
|
||||
ULONG Dacl;
|
||||
} SECURITY_DESCRIPTOR_RELATIVE, *PSECURITY_DESCRIPTOR_RELATIVE, *PISECURITY_DESCRIPTOR_RELATIVE;
|
||||
BYTE Revision;
|
||||
BYTE Sbz1;
|
||||
SECURITY_DESCRIPTOR_CONTROL Control;
|
||||
DWORD Owner;
|
||||
DWORD Group;
|
||||
DWORD Sacl;
|
||||
DWORD Dacl;
|
||||
} SECURITY_DESCRIPTOR_RELATIVE, *PISECURITY_DESCRIPTOR_RELATIVE;
|
||||
typedef enum _TOKEN_INFORMATION_CLASS {
|
||||
TokenUser=1,TokenGroups,TokenPrivileges,TokenOwner,
|
||||
TokenPrimaryGroup,TokenDefaultDacl,TokenSource,TokenType,
|
||||
|
@ -3021,6 +3022,13 @@ typedef union _FILE_SEGMENT_ELEMENT {
|
|||
#define JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT 9
|
||||
#define JOB_OBJECT_MSG_JOB_MEMORY_LIMIT 10
|
||||
|
||||
#define JOB_OBJECT_ASSIGN_PROCESS 1
|
||||
#define JOB_OBJECT_SET_ATTRIBUTES 2
|
||||
#define JOB_OBJECT_QUERY 4
|
||||
#define JOB_OBJECT_TERMINATE 8
|
||||
#define JOB_OBJECT_SET_SECURITY_ATTRIBUTES 16
|
||||
#define JOB_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|31)
|
||||
|
||||
typedef enum _JOBOBJECTINFOCLASS {
|
||||
JobObjectBasicAccountingInformation = 1,
|
||||
JobObjectBasicLimitInformation,
|
||||
|
@ -3095,7 +3103,6 @@ typedef struct _JOBOBJECT_JOBSET_INFORMATION {
|
|||
|
||||
/* Fixme: Making these defines conditional on WINVER will break ddk includes */
|
||||
#if 1 /* (WINVER >= 0x0500) */
|
||||
#include <pshpack4.h>
|
||||
|
||||
#define ES_SYSTEM_REQUIRED 0x00000001
|
||||
#define ES_DISPLAY_REQUIRED 0x00000002
|
||||
|
@ -3387,7 +3394,6 @@ typedef struct _ADMINISTRATOR_POWER_POLICY {
|
|||
ULONG MinSpindownTimeout;
|
||||
ULONG MaxSpindownTimeout;
|
||||
} ADMINISTRATOR_POWER_POLICY, *PADMINISTRATOR_POWER_POLICY;
|
||||
#include <poppack.h>
|
||||
#endif /* WINVER >= 0x0500 */
|
||||
|
||||
typedef VOID (NTAPI *WAITORTIMERCALLBACKFUNC)(PVOID,BOOLEAN);
|
||||
|
@ -3404,6 +3410,14 @@ typedef OSVERSIONINFOEXA OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX;
|
|||
ULONGLONG WINAPI VerSetConditionMask(ULONGLONG,DWORD,BYTE);
|
||||
#endif
|
||||
|
||||
SIZE_T
|
||||
STDCALL
|
||||
RtlCompareMemory (
|
||||
const VOID *Source1,
|
||||
const VOID *Source2,
|
||||
SIZE_T Length
|
||||
);
|
||||
|
||||
#if defined(__GNUC__)
|
||||
|
||||
static __inline__ PVOID GetCurrentFiber(void)
|
||||
|
|
Loading…
Reference in a new issue