Author: sserapion
Date: Wed Sep 24 07:03:27 2008
New Revision: 36475
URL:
http://svn.reactos.org/svn/reactos?rev=36475&view=rev
Log:
- Fix ReadProcessMemory and Toolhelp32ReadProcessMemory definitions.
- Numerous 64bit fixes.
- Remove useless cast.
- Remove Fls API exports as per trunk.
Modified:
branches/ros-amd64-bringup/reactos/dll/win32/kernel32/except/except.c
branches/ros-amd64-bringup/reactos/dll/win32/kernel32/kernel32.spec
branches/ros-amd64-bringup/reactos/dll/win32/kernel32/mem/procmem.c
branches/ros-amd64-bringup/reactos/dll/win32/kernel32/mem/virtual.c
branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/toolhelp.c
branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/utils.c
branches/ros-amd64-bringup/reactos/dll/win32/kernel32/process/procsup.c
Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/except/except.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/kernel32/except/except.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/kernel32/except/except.c [iso-8859-1] Wed
Sep 24 07:03:27 2008
@@ -124,10 +124,11 @@
return psz;
}
-#ifdef _M_IX86
+
static VOID
_dump_context(PCONTEXT pc)
{
+#ifdef _M_IX86
/*
* Print out the CPU registers
*/
@@ -138,10 +139,7 @@
DbgPrint("EDX: %.8x EBP: %.8x ESI: %.8x ESP: %.8x\n", pc->Edx,
pc->Ebp, pc->Esi, pc->Esp);
DbgPrint("EDI: %.8x EFLAGS: %.8x\n", pc->Edi, pc->EFlags);
-}
#elif defined(_M_AMD64)
-_dump_context(PCONTEXT pc)
-{
DbgPrint("CS:EIP %x:%I64x\n", pc->SegCs&0xffff, pc->Rip );
DbgPrint("DS %x ES %x FS %x GS %x\n", pc->SegDs&0xffff,
pc->SegEs&0xffff,
pc->SegFs&0xffff, pc->SegGs&0xfff);
@@ -150,14 +148,10 @@
DbgPrint("R8: %I64x R9: %I64x R10: %I64x R11: %I64x\n", pc->R8,
pc->R9, pc->R10, pc->R11);
DbgPrint("R12: %I64x R13: %I64x R14: %I64x R15: %I64x\n", pc->R12,
pc->R13, pc->R14, pc->R15);
DbgPrint("EFLAGS: %.8x\n", pc->EFlags);
-}
#else
#warning Unknown architecture
-static VOID
-_dump_context(PCONTEXT pc)
-{
-}
#endif
+}
static LONG
BasepCheckForReadOnlyResource(IN PVOID Ptr)
@@ -225,7 +219,7 @@
LONG RetValue;
HANDLE DebugPort = NULL;
NTSTATUS ErrCode;
- ULONG ErrorParameters[4];
+ ULONG_PTR ErrorParameters[4];
ULONG ErrorResponse;
if (ExceptionInfo->ExceptionRecord->ExceptionCode == STATUS_ACCESS_VIOLATION
&&
@@ -322,7 +316,7 @@
/* Save exception code and address */
ErrorParameters[0] = (ULONG)ExceptionInfo->ExceptionRecord->ExceptionCode;
- ErrorParameters[1] = (ULONG)ExceptionInfo->ExceptionRecord->ExceptionAddress;
+ ErrorParameters[1] =
(ULONG_PTR)ExceptionInfo->ExceptionRecord->ExceptionAddress;
if (ExceptionInfo->ExceptionRecord->ExceptionCode == STATUS_ACCESS_VIOLATION)
{
Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/kernel32.spec
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/kernel32/kernel32.spec [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/kernel32/kernel32.spec [iso-8859-1] Wed
Sep 24 07:03:27 2008
@@ -250,10 +250,10 @@
@ stdcall FindResourceW(long wstr wstr)
@ stdcall FindVolumeClose(ptr)
@ stdcall FindVolumeMountPointClose(ptr)
-@ stdcall FlsAlloc(ptr)
-@ stdcall FlsFree(long)
-@ stdcall FlsGetValue(long)
-@ stdcall FlsSetValue(long ptr)
+#@ stdcall FlsAlloc(ptr)
+#@ stdcall FlsFree(long)
+#@ stdcall FlsGetValue(long)
+#@ stdcall FlsSetValue(long ptr)
@ stdcall FlushConsoleInputBuffer(long)
@ stdcall FlushFileBuffers(long)
@ stdcall FlushInstructionCache(long long long)
Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/mem/procmem.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/kernel32/mem/procmem.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/kernel32/mem/procmem.c [iso-8859-1] Wed
Sep 24 07:03:27 2008
@@ -23,8 +23,8 @@
ReadProcessMemory(IN HANDLE hProcess,
IN LPCVOID lpBaseAddress,
IN LPVOID lpBuffer,
- IN DWORD nSize,
- OUT LPDWORD lpNumberOfBytesRead)
+ IN SIZE_T nSize,
+ OUT SIZE_T* lpNumberOfBytesRead)
{
NTSTATUS Status;
Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/mem/virtual.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/kernel32/mem/virtual.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/kernel32/mem/virtual.c [iso-8859-1] Wed
Sep 24 07:03:27 2008
@@ -79,7 +79,7 @@
/* Free the memory */
Status = NtFreeVirtualMemory(hProcess,
(PVOID *)&lpAddress,
- (PULONG)&dwSize,
+ &dwSize,
dwFreeType);
if (!NT_SUCCESS(Status))
{
Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/toolhelp.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/toolhelp.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/toolhelp.c [iso-8859-1] Wed
Sep 24 07:03:27 2008
@@ -225,8 +225,8 @@
HANDLE hSection;
PTH32SNAPSHOT Snapshot;
ULONG_PTR DataOffset;
- ULONG ViewSize, i;
- ULONG nProcesses = 0, nThreads = 0, nHeaps = 0, nModules = 0;
+ SIZE_T ViewSize;
+ ULONG i, nProcesses = 0, nThreads = 0, nHeaps = 0, nModules = 0;
ULONG RequiredSnapshotSize = sizeof(TH32SNAPSHOT);
PRTL_PROCESS_HEAPS hi = NULL;
PRTL_PROCESS_MODULES mi = NULL;
@@ -670,7 +670,7 @@
{
PTH32SNAPSHOT Snapshot;
LARGE_INTEGER SOffset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
NTSTATUS Status;
CHECK_PARAM_SIZE(lphl, sizeof(HEAPLIST32));
@@ -724,7 +724,7 @@
{
PTH32SNAPSHOT Snapshot;
LARGE_INTEGER SOffset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
NTSTATUS Status;
CHECK_PARAM_SIZE(lphl, sizeof(HEAPLIST32));
@@ -811,7 +811,7 @@
{
PTH32SNAPSHOT Snapshot;
LARGE_INTEGER SOffset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
NTSTATUS Status;
CHECK_PARAM_SIZE(lpme, sizeof(MODULEENTRY32W));
@@ -898,7 +898,7 @@
{
PTH32SNAPSHOT Snapshot;
LARGE_INTEGER SOffset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
NTSTATUS Status;
CHECK_PARAM_SIZE(lpme, sizeof(MODULEENTRY32W));
@@ -985,7 +985,7 @@
{
PTH32SNAPSHOT Snapshot;
LARGE_INTEGER SOffset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
NTSTATUS Status;
CHECK_PARAM_SIZE(lppe, sizeof(PROCESSENTRY32W));
@@ -1074,7 +1074,7 @@
{
PTH32SNAPSHOT Snapshot;
LARGE_INTEGER SOffset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
NTSTATUS Status;
CHECK_PARAM_SIZE(lppe, sizeof(PROCESSENTRY32W));
@@ -1128,7 +1128,7 @@
{
PTH32SNAPSHOT Snapshot;
LARGE_INTEGER SOffset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
NTSTATUS Status;
CHECK_PARAM_SIZE(lpte, sizeof(THREADENTRY32));
@@ -1182,7 +1182,7 @@
{
PTH32SNAPSHOT Snapshot;
LARGE_INTEGER SOffset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
NTSTATUS Status;
CHECK_PARAM_SIZE(lpte, sizeof(THREADENTRY32));
@@ -1233,7 +1233,7 @@
BOOL
STDCALL
Toolhelp32ReadProcessMemory(DWORD th32ProcessID, LPCVOID lpBaseAddress,
- LPVOID lpBuffer, DWORD cbRead, LPDWORD lpNumberOfBytesRead)
+ LPVOID lpBuffer, SIZE_T cbRead, SIZE_T* lpNumberOfBytesRead)
{
HANDLE hProcess = OpenProcess(PROCESS_VM_READ, FALSE, th32ProcessID);
if(hProcess != NULL)
Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/utils.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/utils.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/utils.c [iso-8859-1] Wed
Sep 24 07:03:27 2008
@@ -318,7 +318,7 @@
BasepFreeStack(HANDLE hProcess,
PINITIAL_TEB InitialTeb)
{
- ULONG Dummy = 0;
+ SIZE_T Dummy = 0;
/* Free the Stack */
NtFreeVirtualMemory(hProcess,
Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/process/procsup.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/kernel32/process/procsup.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/kernel32/process/procsup.c [iso-8859-1]
Wed Sep 24 07:03:27 2008
@@ -288,7 +288,7 @@
{
NTSTATUS Status;
HANDLE DuplicatedHandle;
- ULONG Dummy;
+ SIZE_T Dummy;
DPRINT("BasepDuplicateAndWriteHandle. hProcess: %lx, Handle: %lx,"
"Address: %p\n", ProcessHandle, StandardHandle, Address);