mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
Use W32API.
svn path=/trunk/; revision=15950
This commit is contained in:
@@ -104,7 +104,7 @@ CsrClientCallServer(PCSRSS_API_REQUEST Request,
|
||||
return (STATUS_UNSUCCESSFUL);
|
||||
}
|
||||
|
||||
Request->Header.DataSize = Length - sizeof(LPC_MESSAGE);
|
||||
Request->Header.DataSize = Length - LPC_MESSAGE_BASE_SIZE;
|
||||
Request->Header.MessageSize = Length;
|
||||
|
||||
Status = NtRequestWaitReplyPort(WindowsApiPort,
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos.h>
|
||||
#include <ntdll/rtl.h>
|
||||
#include <rosrtl/string.h>
|
||||
#include <rosrtl/thread.h>
|
||||
|
||||
@@ -25,11 +25,12 @@
|
||||
|
||||
#include <reactos/config.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos.h>
|
||||
#include <ntos/ldrtypes.h>
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <ntdll/ldr.h>
|
||||
#include <ntos/minmax.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <ntdll/ntdll.h>
|
||||
|
||||
@@ -32,8 +32,8 @@ VOID LdrpInitLoader(VOID);
|
||||
|
||||
extern unsigned int _image_base__;
|
||||
|
||||
static CRITICAL_SECTION PebLock;
|
||||
static CRITICAL_SECTION LoaderLock;
|
||||
static RTL_CRITICAL_SECTION PebLock;
|
||||
static RTL_CRITICAL_SECTION LoaderLock;
|
||||
static RTL_BITMAP TlsBitMap;
|
||||
PLDR_MODULE ExeModule;
|
||||
|
||||
|
||||
@@ -21,11 +21,12 @@
|
||||
|
||||
#include <reactos/config.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos.h>
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <ntdll/ldr.h>
|
||||
#include <ntos/minmax.h>
|
||||
#include <ntdll/rtl.h>
|
||||
|
||||
#define LDRP_PROCESS_CREATION_TIME 0x8000000
|
||||
|
||||
@@ -264,7 +265,7 @@ LdrpInitializeTlsForProccess(VOID)
|
||||
TRUE,
|
||||
IMAGE_DIRECTORY_ENTRY_TLS,
|
||||
NULL);
|
||||
assert(Module->TlsIndex < LdrpTlsCount);
|
||||
ASSERT(Module->TlsIndex < LdrpTlsCount);
|
||||
TlsData = &LdrpTlsArray[Module->TlsIndex];
|
||||
TlsData->StartAddressOfRawData = (PVOID)TlsDirectory->StartAddressOfRawData;
|
||||
TlsData->TlsDataSize = TlsDirectory->EndAddressOfRawData - TlsDirectory->StartAddressOfRawData;
|
||||
@@ -466,7 +467,7 @@ LdrAddModuleEntry(PVOID ImageBase,
|
||||
PLDR_MODULE Module;
|
||||
|
||||
Module = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof (LDR_MODULE));
|
||||
assert(Module);
|
||||
ASSERT(Module);
|
||||
memset(Module, 0, sizeof(LDR_MODULE));
|
||||
Module->BaseAddress = (PVOID)ImageBase;
|
||||
Module->EntryPoint = NTHeaders->OptionalHeader.AddressOfEntryPoint;
|
||||
@@ -2076,7 +2077,7 @@ LdrpLoadModule(IN PWSTR SearchPath OPTIONAL,
|
||||
DPRINT("Mapped %wZ at %x\n", &FullDosName, ImageBase);
|
||||
if (MappedAsDataFile)
|
||||
{
|
||||
assert(NULL != BaseAddress);
|
||||
ASSERT(NULL != BaseAddress);
|
||||
if (NULL != BaseAddress)
|
||||
{
|
||||
*BaseAddress = (PVOID) ((char *) *BaseAddress + 1);
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
<importlibrary definition="def/ntdll.def" />
|
||||
<define name="__NTDLL__" />
|
||||
<define name="_DISABLE_TIDENTS" />
|
||||
<define name="__USE_W32API" />
|
||||
<define name="_WIN32_WINNT">0x0502</define>
|
||||
<define name="_NTOSKRNL_" />
|
||||
<library>rtl</library>
|
||||
<library>rosrtl</library>
|
||||
<library>string</library>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos.h>
|
||||
#include <string.h>
|
||||
#include <debug.h>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos.h>
|
||||
#include <ntdll/rtl.h>
|
||||
#include <ntos/heap.h>
|
||||
|
||||
@@ -653,11 +653,11 @@ RtlpInitAtomTableLock(PRTL_ATOM_TABLE AtomTable)
|
||||
{
|
||||
AtomTable->Lock = RtlAllocateHeap(RtlGetProcessHeap(),
|
||||
HEAP_ZERO_MEMORY,
|
||||
sizeof(CRITICAL_SECTION));
|
||||
sizeof(RTL_CRITICAL_SECTION));
|
||||
if (AtomTable->Lock == NULL)
|
||||
return STATUS_NO_MEMORY;
|
||||
|
||||
RtlInitializeCriticalSection((PCRITICAL_SECTION)AtomTable->Lock);
|
||||
RtlInitializeCriticalSection((PRTL_CRITICAL_SECTION)AtomTable->Lock);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
@@ -668,7 +668,7 @@ RtlpDestroyAtomTableLock(PRTL_ATOM_TABLE AtomTable)
|
||||
{
|
||||
if (AtomTable->Lock)
|
||||
{
|
||||
RtlDeleteCriticalSection((PCRITICAL_SECTION)AtomTable->Lock);
|
||||
RtlDeleteCriticalSection((PRTL_CRITICAL_SECTION)AtomTable->Lock);
|
||||
RtlFreeHeap(RtlGetProcessHeap(),
|
||||
0,
|
||||
AtomTable->Lock);
|
||||
@@ -680,7 +680,7 @@ RtlpDestroyAtomTableLock(PRTL_ATOM_TABLE AtomTable)
|
||||
static BOOLEAN
|
||||
RtlpLockAtomTable(PRTL_ATOM_TABLE AtomTable)
|
||||
{
|
||||
RtlEnterCriticalSection((PCRITICAL_SECTION)AtomTable->Lock);
|
||||
RtlEnterCriticalSection((PRTL_CRITICAL_SECTION)AtomTable->Lock);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -688,7 +688,7 @@ RtlpLockAtomTable(PRTL_ATOM_TABLE AtomTable)
|
||||
static VOID
|
||||
RtlpUnlockAtomTable(PRTL_ATOM_TABLE AtomTable)
|
||||
{
|
||||
RtlLeaveCriticalSection((PCRITICAL_SECTION)AtomTable->Lock);
|
||||
RtlLeaveCriticalSection((PRTL_CRITICAL_SECTION)AtomTable->Lock);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos.h>
|
||||
#include <string.h>
|
||||
#include <napi/teb.h>
|
||||
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
typedef NTSTATUS STDCALL_FUNC (*CALLBACK_FUNCTION)(PVOID Argument,
|
||||
ULONG ArgumentLength);
|
||||
typedef NTSTATUS (STDCALL *KERNEL_CALLBACK_FUNCTION)(PVOID Argument,
|
||||
ULONG ArgumentLength);
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
@@ -28,10 +28,10 @@ KiUserCallbackDispatcher(ULONG RoutineIndex,
|
||||
{
|
||||
PPEB Peb;
|
||||
NTSTATUS Status;
|
||||
CALLBACK_FUNCTION Callback;
|
||||
KERNEL_CALLBACK_FUNCTION Callback;
|
||||
|
||||
Peb = NtCurrentPeb();
|
||||
Callback = (CALLBACK_FUNCTION)Peb->KernelCallbackTable[RoutineIndex];
|
||||
Callback = (KERNEL_CALLBACK_FUNCTION)Peb->KernelCallbackTable[RoutineIndex];
|
||||
Status = Callback(Argument, ArgumentLength);
|
||||
ZwCallbackReturn(NULL, 0, Status);
|
||||
}
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <windows.h>
|
||||
#include <ntos.h>
|
||||
#include <ntdll/rtl.h>
|
||||
#include <ntos/synch.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <ntdll/ntdll.h>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <napi/teb.h>
|
||||
#include <ntdll/rtl.h>
|
||||
#include <ntdll/ldr.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos.h>
|
||||
|
||||
#include <rosrtl/thread.h>
|
||||
|
||||
|
||||
@@ -14,15 +14,16 @@
|
||||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos.h>
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
#include <ntdll/rtl.h>
|
||||
#include <napi/teb.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
static CRITICAL_SECTION RtlpVectoredExceptionLock;
|
||||
static RTL_CRITICAL_SECTION RtlpVectoredExceptionLock;
|
||||
static LIST_ENTRY RtlpVectoredExceptionHead;
|
||||
|
||||
typedef struct _RTL_VECTORED_EXCEPTION_HANDLER
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos.h>
|
||||
#include <ntdll/rtl.h>
|
||||
#include <ctype.h>
|
||||
#include <ntos/minmax.h>
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos.h>
|
||||
#include <ntos/ldrtypes.h>
|
||||
#include <ddk/ldrfuncs.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <ntdll/ntdll.h>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <windows.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos.h>
|
||||
#include <ntdll/rtl.h>
|
||||
|
||||
#define NDEBUG
|
||||
|
||||
@@ -10,14 +10,12 @@
|
||||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos.h>
|
||||
#include <ntdll/rtl.h>
|
||||
#include <ntos/minmax.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <base.h>
|
||||
#include <ddk/obfuncs.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <ntdll/ntdll.h>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/* INCLUDES ****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos.h>
|
||||
#include <windows.h>
|
||||
#include <napi/i386/segment.h>
|
||||
#include <ntdll/ldr.h>
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
|
||||
/* INCLUDES ****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos.h>
|
||||
#include <ntdll/rtl.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <ntdll/ntdll.h>
|
||||
|
||||
@@ -18,9 +18,8 @@
|
||||
* The code is based on information published in WDJ January 1999 issue.
|
||||
*/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos.h>
|
||||
#include <ntdll/rtl.h>
|
||||
#include <ntos/synch.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <ntdll/ntdll.h>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos/heap.h>
|
||||
#include <ntos.h>
|
||||
#include <ntdll/rtl.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <ntdll/ntdll.h>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* PURPOSE: converts a multi byte string to a unicode string
|
||||
*/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* PURPOSE: converts a unicode string to a multi byte string
|
||||
*/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ntos.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user