mirror of
https://github.com/reactos/reactos.git
synced 2025-05-29 14:08:22 +00:00
More NDK fixes, remove duplicated debug functions from ntdll, use rosrtl header where neded in ntdll.
svn path=/trunk/; revision=16107
This commit is contained in:
parent
fd45cff559
commit
448fd2a82a
7 changed files with 60 additions and 39 deletions
|
@ -72,7 +72,6 @@ extern NTOSAPI POBJECT_TYPE PsThreadType;
|
||||||
/* ENUMERATIONS **************************************************************/
|
/* ENUMERATIONS **************************************************************/
|
||||||
|
|
||||||
/* FUNCTION TYPES ************************************************************/
|
/* FUNCTION TYPES ************************************************************/
|
||||||
typedef DWORD (STDCALL* PTHREAD_START_ROUTINE) (LPVOID);
|
|
||||||
typedef VOID (STDCALL *PPEBLOCKROUTINE)(PVOID);
|
typedef VOID (STDCALL *PPEBLOCKROUTINE)(PVOID);
|
||||||
|
|
||||||
typedef NTSTATUS
|
typedef NTSTATUS
|
||||||
|
|
|
@ -362,6 +362,15 @@ RtlAddAtomToAtomTable (
|
||||||
OUT PRTL_ATOM Atom
|
OUT PRTL_ATOM Atom
|
||||||
);
|
);
|
||||||
|
|
||||||
|
VOID
|
||||||
|
STDCALL
|
||||||
|
RtlAssert (
|
||||||
|
PVOID FailedAssertion,
|
||||||
|
PVOID FileName,
|
||||||
|
ULONG LineNumber,
|
||||||
|
PCHAR Message
|
||||||
|
);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
STDCALL
|
STDCALL
|
||||||
RtlCopyLuid(
|
RtlCopyLuid(
|
||||||
|
@ -711,6 +720,14 @@ RtlUnicodeStringToAnsiSize (
|
||||||
IN PUNICODE_STRING UnicodeString
|
IN PUNICODE_STRING UnicodeString
|
||||||
);
|
);
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
STDCALL
|
||||||
|
RtlUnicodeStringToAnsiString (
|
||||||
|
IN OUT PANSI_STRING DestinationString,
|
||||||
|
IN PUNICODE_STRING SourceString,
|
||||||
|
IN BOOLEAN AllocateDestinationString
|
||||||
|
);
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
STDCALL
|
||||||
RtlUnicodeStringToInteger (
|
RtlUnicodeStringToInteger (
|
||||||
|
|
|
@ -49,15 +49,29 @@ typedef enum
|
||||||
|
|
||||||
/* FUNCTION TYPES ************************************************************/
|
/* FUNCTION TYPES ************************************************************/
|
||||||
typedef NTSTATUS
|
typedef NTSTATUS
|
||||||
(*PHEAP_ENUMERATION_ROUTINE)(IN PVOID HeapHandle,
|
(*PHEAP_ENUMERATION_ROUTINE)(
|
||||||
IN PVOID UserParam);
|
IN PVOID HeapHandle,
|
||||||
|
IN PVOID UserParam
|
||||||
|
);
|
||||||
|
|
||||||
typedef EXCEPTION_DISPOSITION
|
typedef EXCEPTION_DISPOSITION
|
||||||
(*PEXCEPTION_HANDLER)(struct _EXCEPTION_RECORD*,
|
(*PEXCEPTION_HANDLER)(
|
||||||
PVOID,
|
struct _EXCEPTION_RECORD*,
|
||||||
struct _CONTEXT*,
|
PVOID,
|
||||||
PVOID);
|
struct _CONTEXT*,
|
||||||
|
PVOID
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef DWORD (STDCALL *PTHREAD_START_ROUTINE)(
|
||||||
|
LPVOID Parameter
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef VOID
|
||||||
|
(STDCALL *PRTL_BASE_PROCESS_START_ROUTINE)(
|
||||||
|
PTHREAD_START_ROUTINE StartAddress,
|
||||||
|
PVOID Parameter
|
||||||
|
);
|
||||||
|
|
||||||
/* TYPES *********************************************************************/
|
/* TYPES *********************************************************************/
|
||||||
|
|
||||||
typedef unsigned short RTL_ATOM;
|
typedef unsigned short RTL_ATOM;
|
||||||
|
|
|
@ -46,6 +46,17 @@
|
||||||
#define NT_WARNING(x) ((ULONG)(x)>>30==2)
|
#define NT_WARNING(x) ((ULONG)(x)>>30==2)
|
||||||
#define NT_ERROR(x) ((ULONG)(x)>>30==3)
|
#define NT_ERROR(x) ((ULONG)(x)>>30==3)
|
||||||
|
|
||||||
|
/* Object Access Rights FIXME: Some are in w32api's psdk..,is that normal ?*/
|
||||||
|
#define DIRECTORY_QUERY (0x0001)
|
||||||
|
#define DIRECTORY_TRAVERSE (0x0002)
|
||||||
|
#define DIRECTORY_CREATE_OBJECT (0x0004)
|
||||||
|
#define DIRECTORY_CREATE_SUBDIRECTORY (0x0008)
|
||||||
|
#define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0xF)
|
||||||
|
#define EVENT_QUERY_STATE (0x0001)
|
||||||
|
#define SEMAPHORE_QUERY_STATE (0x0001)
|
||||||
|
#define SYMBOLIC_LINK_QUERY 0x0001
|
||||||
|
#define SYMBOLIC_LINK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
|
||||||
|
|
||||||
/* I/O Control Codes for communicating with Mailslots */
|
/* I/O Control Codes for communicating with Mailslots */
|
||||||
#define FSCTL_MAILSLOT_PEEK \
|
#define FSCTL_MAILSLOT_PEEK \
|
||||||
CTL_CODE(FILE_DEVICE_MAILSLOT, 0, METHOD_NEITHER, FILE_READ_DATA)
|
CTL_CODE(FILE_DEVICE_MAILSLOT, 0, METHOD_NEITHER, FILE_READ_DATA)
|
||||||
|
@ -709,6 +720,15 @@ typedef struct _FILE_BASIC_INFORMATION
|
||||||
} FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
|
} FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
|
||||||
|
|
||||||
/* Class 2 */
|
/* Class 2 */
|
||||||
|
typedef struct _FILE_STANDARD_INFORMATION
|
||||||
|
{
|
||||||
|
LARGE_INTEGER AllocationSize;
|
||||||
|
LARGE_INTEGER EndOfFile;
|
||||||
|
ULONG NumberOfLinks;
|
||||||
|
BOOLEAN DeletePending;
|
||||||
|
BOOLEAN Directory;
|
||||||
|
} FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
|
||||||
|
|
||||||
typedef struct _FILE_NETWORK_OPEN_INFORMATION
|
typedef struct _FILE_NETWORK_OPEN_INFORMATION
|
||||||
{
|
{
|
||||||
LARGE_INTEGER CreationTime;
|
LARGE_INTEGER CreationTime;
|
||||||
|
|
|
@ -3,44 +3,13 @@
|
||||||
#include <ntos/ntdef.h>
|
#include <ntos/ntdef.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define UNIMPLEMENTED DbgPrint("%s in %s:%d is unimplemented\n",__FUNCTION__,__FILE__,__LINE__);
|
|
||||||
|
|
||||||
#ifndef __USE_W32API
|
|
||||||
|
|
||||||
#ifndef NASSERT
|
|
||||||
#define assert(x) if (!(x)) {DbgPrint("Assertion "#x" failed at %s:%d\n", __FILE__,__LINE__); for(;;);}
|
|
||||||
#define ASSERT(x) if (!(x)) {DbgPrint("Assertion "#x" failed at %s:%d\n", __FILE__,__LINE__); for(;;);}
|
|
||||||
#else
|
|
||||||
#define assert(x)
|
|
||||||
#define ASSERT(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
#define TRACE_LDR(args...) if (RtlGetNtGlobalFlags() & FLG_SHOW_LDR_SNAPS) { DbgPrint("(LDR:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); }
|
#define TRACE_LDR(args...) if (RtlGetNtGlobalFlags() & FLG_SHOW_LDR_SNAPS) { DbgPrint("(LDR:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); }
|
||||||
#define DPRINT(args...)
|
|
||||||
#else
|
#else
|
||||||
#define DPRINT
|
|
||||||
#endif /* __GNUC__ */
|
#endif /* __GNUC__ */
|
||||||
#define CHECKPOINT
|
|
||||||
#else
|
#else
|
||||||
#define TRACE_LDR(args...) do { DbgPrint("(LDR:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0)
|
#define TRACE_LDR(args...) do { DbgPrint("(LDR:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0)
|
||||||
#define DPRINT(args...) do { DbgPrint("(NTDLL:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0)
|
|
||||||
#define CHECKPOINT do { DbgPrint("(NTDLL:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DBG
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
#define DPRINT1(args...) do { DbgPrint("(NTDLL:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0)
|
|
||||||
#else
|
|
||||||
#define DPRINT1 DbgPrint("(NTDLL:%s:%d) ",__FILE__,__LINE__); DbgPrint
|
|
||||||
#endif
|
|
||||||
#define CHECKPOINT1 do { DbgPrint("(NTDLL:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0)
|
|
||||||
#else
|
|
||||||
#define DPRINT1(args...)
|
|
||||||
#define CHECKPOINT1(args...)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Macros expanding to the appropriate inline assembly to raise a breakpoint */
|
/* Macros expanding to the appropriate inline assembly to raise a breakpoint */
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <ntdll.h>
|
#include <ntdll.h>
|
||||||
|
#include <rosrtl/thread.h>
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include <ntdll/rtl.h>
|
#include <ntdll/rtl.h>
|
||||||
#include <ntdll/ldr.h>
|
#include <ntdll/ldr.h>
|
||||||
#include <ntdll/ntdll.h>
|
#include <ntdll/ntdll.h>
|
||||||
|
#include <debug.h> /* FIXME REMOVE THIS */
|
||||||
|
|
||||||
/* ROSRTL Headers */
|
/* ROSRTL Headers */
|
||||||
#include <rosrtl/string.h> /* FIXME: KILL ROSRTL */
|
#include <rosrtl/string.h> /* FIXME: KILL ROSRTL */
|
||||||
|
|
Loading…
Reference in a new issue