mirror of
https://github.com/reactos/reactos.git
synced 2025-01-04 05:20:54 +00:00
fixed some prototypes
svn path=/trunk/; revision=19735
This commit is contained in:
parent
8c581cc643
commit
012bdf846d
17 changed files with 62 additions and 56 deletions
|
@ -269,12 +269,14 @@ int main()
|
||||||
statt->desc , waitt->desc);
|
statt->desc , waitt->desc);
|
||||||
WriteFile(stdout, buf1, lstrlen(buf1), &r, NULL);
|
WriteFile(stdout, buf1, lstrlen(buf1), &r, NULL);
|
||||||
|
|
||||||
EnumThreadWindows((DWORD)CurrentProcess->Threads[ti].ClientId.UniqueThread,
|
EnumThreadWindows(PtrToUlong(CurrentProcess->Threads[ti].ClientId.UniqueThread),
|
||||||
(WNDENUMPROC) EnumThreadProc,
|
(WNDENUMPROC) EnumThreadProc,
|
||||||
(LPARAM)(LPTSTR) szWindowName );
|
(LPARAM)(LPTSTR) szWindowName );
|
||||||
}
|
}
|
||||||
|
typedef __attribute__((mode (__pointer__))) unsigned long ULONG_PTRX;
|
||||||
|
CurrentProcess = (PSYSTEM_PROCESSES)((ULONG_PTRX)CurrentProcess + 1);
|
||||||
CurrentProcess = (PSYSTEM_PROCESSES)((ULONG_PTR)CurrentProcess +
|
CurrentProcess = (PSYSTEM_PROCESSES)((ULONG_PTR)CurrentProcess +
|
||||||
CurrentProcess->NextEntryOffset);
|
(ULONG_PTR)CurrentProcess->NextEntryOffset);
|
||||||
}
|
}
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ NtAllocateVirtualMemory(
|
||||||
IN HANDLE ProcessHandle,
|
IN HANDLE ProcessHandle,
|
||||||
IN OUT PVOID *BaseAddress,
|
IN OUT PVOID *BaseAddress,
|
||||||
IN ULONG ZeroBits,
|
IN ULONG ZeroBits,
|
||||||
IN OUT PULONG RegionSize,
|
IN OUT PSIZE_T RegionSize,
|
||||||
IN ULONG AllocationType,
|
IN ULONG AllocationType,
|
||||||
IN ULONG Protect
|
IN ULONG Protect
|
||||||
);
|
);
|
||||||
|
@ -97,7 +97,7 @@ NTAPI
|
||||||
NtFreeVirtualMemory(
|
NtFreeVirtualMemory(
|
||||||
IN HANDLE ProcessHandle,
|
IN HANDLE ProcessHandle,
|
||||||
IN PVOID *BaseAddress,
|
IN PVOID *BaseAddress,
|
||||||
IN PULONG RegionSize,
|
IN PSIZE_T RegionSize,
|
||||||
IN ULONG FreeType
|
IN ULONG FreeType
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ NtMapViewOfSection(
|
||||||
IN ULONG ZeroBits,
|
IN ULONG ZeroBits,
|
||||||
IN ULONG CommitSize,
|
IN ULONG CommitSize,
|
||||||
IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
|
IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
|
||||||
IN OUT PULONG ViewSize,
|
IN OUT PSIZE_T ViewSize,
|
||||||
IN SECTION_INHERIT InheritDisposition,
|
IN SECTION_INHERIT InheritDisposition,
|
||||||
IN ULONG AllocationType,
|
IN ULONG AllocationType,
|
||||||
IN ULONG AccessProtection
|
IN ULONG AccessProtection
|
||||||
|
@ -207,7 +207,7 @@ ZwAllocateVirtualMemory(
|
||||||
IN HANDLE ProcessHandle,
|
IN HANDLE ProcessHandle,
|
||||||
IN OUT PVOID *BaseAddress,
|
IN OUT PVOID *BaseAddress,
|
||||||
IN ULONG ZeroBits,
|
IN ULONG ZeroBits,
|
||||||
IN OUT PULONG RegionSize,
|
IN OUT PSIZE_T RegionSize,
|
||||||
IN ULONG AllocationType,
|
IN ULONG AllocationType,
|
||||||
IN ULONG Protect
|
IN ULONG Protect
|
||||||
);
|
);
|
||||||
|
@ -247,7 +247,7 @@ NTAPI
|
||||||
ZwFreeVirtualMemory(
|
ZwFreeVirtualMemory(
|
||||||
IN HANDLE ProcessHandle,
|
IN HANDLE ProcessHandle,
|
||||||
IN PVOID *BaseAddress,
|
IN PVOID *BaseAddress,
|
||||||
IN PULONG RegionSize,
|
IN PSIZE_T RegionSize,
|
||||||
IN ULONG FreeType
|
IN ULONG FreeType
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ ZwMapViewOfSection(
|
||||||
IN ULONG ZeroBits,
|
IN ULONG ZeroBits,
|
||||||
IN ULONG CommitSize,
|
IN ULONG CommitSize,
|
||||||
IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
|
IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
|
||||||
IN OUT PULONG ViewSize,
|
IN OUT PSIZE_T ViewSize,
|
||||||
IN SECTION_INHERIT InheritDisposition,
|
IN SECTION_INHERIT InheritDisposition,
|
||||||
IN ULONG AllocationType,
|
IN ULONG AllocationType,
|
||||||
IN ULONG AccessProtection
|
IN ULONG AccessProtection
|
||||||
|
|
|
@ -35,7 +35,7 @@ CopyLoop (
|
||||||
NTSTATUS errCode;
|
NTSTATUS errCode;
|
||||||
IO_STATUS_BLOCK IoStatusBlock;
|
IO_STATUS_BLOCK IoStatusBlock;
|
||||||
UCHAR *lpBuffer = NULL;
|
UCHAR *lpBuffer = NULL;
|
||||||
ULONG RegionSize = 0x10000;
|
SIZE_T RegionSize = 0x10000;
|
||||||
LARGE_INTEGER BytesCopied;
|
LARGE_INTEGER BytesCopied;
|
||||||
DWORD CallbackReason;
|
DWORD CallbackReason;
|
||||||
DWORD ProgressResult;
|
DWORD ProgressResult;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
LPVOID STDCALL
|
LPVOID STDCALL
|
||||||
VirtualAllocEx(HANDLE hProcess,
|
VirtualAllocEx(HANDLE hProcess,
|
||||||
LPVOID lpAddress,
|
LPVOID lpAddress,
|
||||||
DWORD dwSize,
|
SIZE_T dwSize,
|
||||||
DWORD flAllocationType,
|
DWORD flAllocationType,
|
||||||
DWORD flProtect)
|
DWORD flProtect)
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,7 @@ VirtualAllocEx(HANDLE hProcess,
|
||||||
Status = NtAllocateVirtualMemory(hProcess,
|
Status = NtAllocateVirtualMemory(hProcess,
|
||||||
(PVOID *)&lpAddress,
|
(PVOID *)&lpAddress,
|
||||||
0,
|
0,
|
||||||
(PULONG)&dwSize,
|
&dwSize,
|
||||||
flAllocationType,
|
flAllocationType,
|
||||||
flProtect);
|
flProtect);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
@ -48,7 +48,7 @@ VirtualAllocEx(HANDLE hProcess,
|
||||||
*/
|
*/
|
||||||
LPVOID STDCALL
|
LPVOID STDCALL
|
||||||
VirtualAlloc(LPVOID lpAddress,
|
VirtualAlloc(LPVOID lpAddress,
|
||||||
DWORD dwSize,
|
SIZE_T dwSize,
|
||||||
DWORD flAllocationType,
|
DWORD flAllocationType,
|
||||||
DWORD flProtect)
|
DWORD flProtect)
|
||||||
{
|
{
|
||||||
|
@ -66,7 +66,7 @@ VirtualAlloc(LPVOID lpAddress,
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
VirtualFreeEx(HANDLE hProcess,
|
VirtualFreeEx(HANDLE hProcess,
|
||||||
LPVOID lpAddress,
|
LPVOID lpAddress,
|
||||||
DWORD dwSize,
|
SIZE_T dwSize,
|
||||||
DWORD dwFreeType)
|
DWORD dwFreeType)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
@ -89,7 +89,7 @@ VirtualFreeEx(HANDLE hProcess,
|
||||||
*/
|
*/
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
VirtualFree(LPVOID lpAddress,
|
VirtualFree(LPVOID lpAddress,
|
||||||
DWORD dwSize,
|
SIZE_T dwSize,
|
||||||
DWORD dwFreeType)
|
DWORD dwFreeType)
|
||||||
{
|
{
|
||||||
return(VirtualFreeEx(GetCurrentProcess(),
|
return(VirtualFreeEx(GetCurrentProcess(),
|
||||||
|
@ -104,7 +104,7 @@ VirtualFree(LPVOID lpAddress,
|
||||||
*/
|
*/
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
VirtualProtect(LPVOID lpAddress,
|
VirtualProtect(LPVOID lpAddress,
|
||||||
DWORD dwSize,
|
SIZE_T dwSize,
|
||||||
DWORD flNewProtect,
|
DWORD flNewProtect,
|
||||||
PDWORD lpflOldProtect)
|
PDWORD lpflOldProtect)
|
||||||
{
|
{
|
||||||
|
@ -122,7 +122,7 @@ VirtualProtect(LPVOID lpAddress,
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
VirtualProtectEx(HANDLE hProcess,
|
VirtualProtectEx(HANDLE hProcess,
|
||||||
LPVOID lpAddress,
|
LPVOID lpAddress,
|
||||||
DWORD dwSize,
|
SIZE_T dwSize,
|
||||||
DWORD flNewProtect,
|
DWORD flNewProtect,
|
||||||
PDWORD lpflOldProtect)
|
PDWORD lpflOldProtect)
|
||||||
{
|
{
|
||||||
|
@ -147,7 +147,7 @@ VirtualProtectEx(HANDLE hProcess,
|
||||||
*/
|
*/
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
VirtualLock(LPVOID lpAddress,
|
VirtualLock(LPVOID lpAddress,
|
||||||
DWORD dwSize)
|
SIZE_T dwSize)
|
||||||
{
|
{
|
||||||
ULONG BytesLocked;
|
ULONG BytesLocked;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
@ -171,7 +171,7 @@ VirtualLock(LPVOID lpAddress,
|
||||||
DWORD STDCALL
|
DWORD STDCALL
|
||||||
VirtualQuery(LPCVOID lpAddress,
|
VirtualQuery(LPCVOID lpAddress,
|
||||||
PMEMORY_BASIC_INFORMATION lpBuffer,
|
PMEMORY_BASIC_INFORMATION lpBuffer,
|
||||||
DWORD dwLength)
|
SIZE_T dwLength)
|
||||||
{
|
{
|
||||||
return(VirtualQueryEx(NtCurrentProcess(),
|
return(VirtualQueryEx(NtCurrentProcess(),
|
||||||
lpAddress,
|
lpAddress,
|
||||||
|
@ -187,7 +187,7 @@ DWORD STDCALL
|
||||||
VirtualQueryEx(HANDLE hProcess,
|
VirtualQueryEx(HANDLE hProcess,
|
||||||
LPCVOID lpAddress,
|
LPCVOID lpAddress,
|
||||||
PMEMORY_BASIC_INFORMATION lpBuffer,
|
PMEMORY_BASIC_INFORMATION lpBuffer,
|
||||||
DWORD dwLength)
|
SIZE_T dwLength)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
ULONG ResultLength;
|
ULONG ResultLength;
|
||||||
|
@ -212,7 +212,7 @@ VirtualQueryEx(HANDLE hProcess,
|
||||||
*/
|
*/
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
VirtualUnlock(LPVOID lpAddress,
|
VirtualUnlock(LPVOID lpAddress,
|
||||||
DWORD dwSize)
|
SIZE_T dwSize)
|
||||||
{
|
{
|
||||||
ULONG BytesLocked;
|
ULONG BytesLocked;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
|
@ -95,7 +95,7 @@ static VOID
|
||||||
TH32FreeAllocatedResources(PRTL_DEBUG_BUFFER HeapDebug,
|
TH32FreeAllocatedResources(PRTL_DEBUG_BUFFER HeapDebug,
|
||||||
PRTL_DEBUG_BUFFER ModuleDebug,
|
PRTL_DEBUG_BUFFER ModuleDebug,
|
||||||
PVOID ProcThrdInfo,
|
PVOID ProcThrdInfo,
|
||||||
ULONG ProcThrdInfoSize)
|
SIZE_T ProcThrdInfoSize)
|
||||||
{
|
{
|
||||||
if(HeapDebug != NULL)
|
if(HeapDebug != NULL)
|
||||||
{
|
{
|
||||||
|
@ -121,7 +121,7 @@ TH32CreateSnapshot(DWORD dwFlags,
|
||||||
PRTL_DEBUG_BUFFER *HeapDebug,
|
PRTL_DEBUG_BUFFER *HeapDebug,
|
||||||
PRTL_DEBUG_BUFFER *ModuleDebug,
|
PRTL_DEBUG_BUFFER *ModuleDebug,
|
||||||
PVOID *ProcThrdInfo,
|
PVOID *ProcThrdInfo,
|
||||||
ULONG *ProcThrdInfoSize)
|
SIZE_T *ProcThrdInfoSize)
|
||||||
{
|
{
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
|
@ -1115,7 +1115,7 @@ CreateToolhelp32Snapshot(DWORD dwFlags, DWORD th32ProcessID)
|
||||||
{
|
{
|
||||||
PRTL_DEBUG_BUFFER HeapDebug, ModuleDebug;
|
PRTL_DEBUG_BUFFER HeapDebug, ModuleDebug;
|
||||||
PVOID ProcThrdInfo;
|
PVOID ProcThrdInfo;
|
||||||
ULONG ProcThrdInfoSize;
|
SIZE_T ProcThrdInfoSize;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
HANDLE hSnapShotSection = NULL;
|
HANDLE hSnapShotSection = NULL;
|
||||||
|
|
||||||
|
|
|
@ -366,7 +366,7 @@ BasepInitializeEnvironment(HANDLE ProcessHandle,
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
PWCHAR ScanChar;
|
PWCHAR ScanChar;
|
||||||
ULONG EnviroSize;
|
ULONG EnviroSize;
|
||||||
ULONG Size;
|
SIZE_T Size;
|
||||||
UNICODE_STRING Desktop, Shell, Runtime, Title;
|
UNICODE_STRING Desktop, Shell, Runtime, Title;
|
||||||
PPEB OurPeb = NtCurrentPeb();
|
PPEB OurPeb = NtCurrentPeb();
|
||||||
LPVOID Environment = lpEnvironment;
|
LPVOID Environment = lpEnvironment;
|
||||||
|
|
|
@ -22,12 +22,12 @@ RtlCreateQueryDebugBuffer(IN ULONG Size,
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
PRTL_DEBUG_BUFFER Buf = NULL;
|
PRTL_DEBUG_BUFFER Buf = NULL;
|
||||||
ULONG SectionSize = 100 * PAGE_SIZE;
|
SIZE_T SectionSize = 100 * PAGE_SIZE;
|
||||||
|
|
||||||
Status = NtAllocateVirtualMemory( NtCurrentProcess(),
|
Status = NtAllocateVirtualMemory( NtCurrentProcess(),
|
||||||
(PVOID)&Buf,
|
(PVOID*)&Buf,
|
||||||
0,
|
0,
|
||||||
&SectionSize,
|
&SectionSize,
|
||||||
MEM_COMMIT,
|
MEM_COMMIT,
|
||||||
PAGE_READWRITE);
|
PAGE_READWRITE);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
|
|
@ -291,10 +291,10 @@ HEAP_Commit(SUBHEAP *subheap,
|
||||||
PVOID ptr,
|
PVOID ptr,
|
||||||
ULONG flags)
|
ULONG flags)
|
||||||
{
|
{
|
||||||
ULONG size = (ULONG)((char *)ptr - (char *)subheap);
|
SIZE_T size = (SIZE_T)((char *)ptr - (char *)subheap);
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
PVOID address;
|
PVOID address;
|
||||||
ULONG commitsize;
|
SIZE_T commitsize;
|
||||||
|
|
||||||
size = (size + COMMIT_MASK) & ~COMMIT_MASK;
|
size = (size + COMMIT_MASK) & ~COMMIT_MASK;
|
||||||
if (size > subheap->size)
|
if (size > subheap->size)
|
||||||
|
@ -516,7 +516,7 @@ static void HEAP_ShrinkBlock(SUBHEAP *subheap, ARENA_INUSE *pArena, ULONG size)
|
||||||
* HEAP_InitSubHeap
|
* HEAP_InitSubHeap
|
||||||
*/
|
*/
|
||||||
static BOOLEAN HEAP_InitSubHeap( HEAP *heap, PVOID address, ULONG flags,
|
static BOOLEAN HEAP_InitSubHeap( HEAP *heap, PVOID address, ULONG flags,
|
||||||
ULONG commitSize, ULONG totalSize,
|
SIZE_T commitSize, ULONG totalSize,
|
||||||
PRTL_HEAP_PARAMETERS Parameters )
|
PRTL_HEAP_PARAMETERS Parameters )
|
||||||
{
|
{
|
||||||
SUBHEAP *subheap = (SUBHEAP *)address;
|
SUBHEAP *subheap = (SUBHEAP *)address;
|
||||||
|
@ -611,7 +611,7 @@ static BOOLEAN HEAP_InitSubHeap( HEAP *heap, PVOID address, ULONG flags,
|
||||||
static PSUBHEAP
|
static PSUBHEAP
|
||||||
HEAP_CreateSubHeap(PVOID BaseAddress,
|
HEAP_CreateSubHeap(PVOID BaseAddress,
|
||||||
HEAP *heap, ULONG flags,
|
HEAP *heap, ULONG flags,
|
||||||
ULONG commitSize, ULONG totalSize,
|
SIZE_T commitSize, ULONG totalSize,
|
||||||
PRTL_HEAP_PARAMETERS Parameters )
|
PRTL_HEAP_PARAMETERS Parameters )
|
||||||
{
|
{
|
||||||
PVOID address;
|
PVOID address;
|
||||||
|
@ -671,7 +671,7 @@ HEAP_CreateSubHeap(PVOID BaseAddress,
|
||||||
* Find a free block at least as large as the requested size, and make sure
|
* Find a free block at least as large as the requested size, and make sure
|
||||||
* the requested size is committed.
|
* the requested size is committed.
|
||||||
*/
|
*/
|
||||||
static ARENA_FREE *HEAP_FindFreeBlock( HEAP *heap, ULONG size,
|
static ARENA_FREE *HEAP_FindFreeBlock( HEAP *heap, SIZE_T size,
|
||||||
SUBHEAP **ppSubHeap )
|
SUBHEAP **ppSubHeap )
|
||||||
{
|
{
|
||||||
SUBHEAP *subheap;
|
SUBHEAP *subheap;
|
||||||
|
|
|
@ -1277,9 +1277,9 @@ MmAlterRegion(
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
MmInitialiseRegion(
|
MmInitializeRegion(
|
||||||
PLIST_ENTRY RegionListHead,
|
PLIST_ENTRY RegionListHead,
|
||||||
ULONG Length,
|
SIZE_T Length,
|
||||||
ULONG Type,
|
ULONG Type,
|
||||||
ULONG Protect
|
ULONG Protect
|
||||||
);
|
);
|
||||||
|
|
|
@ -114,6 +114,7 @@ static const ULARGE_INTEGER __emptyULargeInteger = {{0, 0}};
|
||||||
#define ProbeForWritePointer(Ptr) ProbeForWriteGenericType(Ptr, PVOID)
|
#define ProbeForWritePointer(Ptr) ProbeForWriteGenericType(Ptr, PVOID)
|
||||||
#define ProbeForWriteHandle(Ptr) ProbeForWriteGenericType(Ptr, HANDLE)
|
#define ProbeForWriteHandle(Ptr) ProbeForWriteGenericType(Ptr, HANDLE)
|
||||||
#define ProbeForWriteLangid(Ptr) ProbeForWriteGenericType(Ptr, LANGID)
|
#define ProbeForWriteLangid(Ptr) ProbeForWriteGenericType(Ptr, LANGID)
|
||||||
|
#define ProbeForWriteSize_t(Ptr) ProbeForWriteGenericType(Ptr, SIZE_T)
|
||||||
#define ProbeForWriteLargeInteger(Ptr) ProbeForWriteGenericType(&(Ptr)->QuadPart, LONGLONG)
|
#define ProbeForWriteLargeInteger(Ptr) ProbeForWriteGenericType(&(Ptr)->QuadPart, LONGLONG)
|
||||||
#define ProbeForWriteUlargeInteger(Ptr) ProbeForWriteGenericType(&(Ptr)->QuadPart, ULONGLONG)
|
#define ProbeForWriteUlargeInteger(Ptr) ProbeForWriteGenericType(&(Ptr)->QuadPart, ULONGLONG)
|
||||||
#define ProbeForWriteUnicodeString(Ptr) ProbeForWriteGenericType(Ptr, UNICODE_STRING)
|
#define ProbeForWriteUnicodeString(Ptr) ProbeForWriteGenericType(Ptr, UNICODE_STRING)
|
||||||
|
@ -138,6 +139,7 @@ static const ULARGE_INTEGER __emptyULargeInteger = {{0, 0}};
|
||||||
#define ProbeForReadPointer(Ptr) ProbeForReadGenericType(Ptr, PVOID, NULL)
|
#define ProbeForReadPointer(Ptr) ProbeForReadGenericType(Ptr, PVOID, NULL)
|
||||||
#define ProbeForReadHandle(Ptr) ProbeForReadGenericType(Ptr, HANDLE, NULL)
|
#define ProbeForReadHandle(Ptr) ProbeForReadGenericType(Ptr, HANDLE, NULL)
|
||||||
#define ProbeForReadLangid(Ptr) ProbeForReadGenericType(Ptr, LANGID, 0)
|
#define ProbeForReadLangid(Ptr) ProbeForReadGenericType(Ptr, LANGID, 0)
|
||||||
|
#define ProbeForReadSize_t(Ptr) ProbeForReadGenericType(Ptr, SIZE_T, 0)
|
||||||
#define ProbeForReadLargeInteger(Ptr) ProbeForReadGenericType(Ptr, LARGE_INTEGER, __emptyLargeInteger)
|
#define ProbeForReadLargeInteger(Ptr) ProbeForReadGenericType(Ptr, LARGE_INTEGER, __emptyLargeInteger)
|
||||||
#define ProbeForReadUlargeInteger(Ptr) ProbeForReadGenericType(Ptr, ULARGE_INTEGER, __emptyULargeInteger)
|
#define ProbeForReadUlargeInteger(Ptr) ProbeForReadGenericType(Ptr, ULARGE_INTEGER, __emptyULargeInteger)
|
||||||
#define ProbeForReadUnicodeString(Ptr) ProbeForReadGenericType(Ptr, UNICODE_STRING, __emptyUnicodeString)
|
#define ProbeForReadUnicodeString(Ptr) ProbeForReadGenericType(Ptr, UNICODE_STRING, __emptyUnicodeString)
|
||||||
|
|
|
@ -747,7 +747,7 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle,
|
||||||
MemoryAreaLength = (ULONG_PTR)MemoryArea->EndingAddress -
|
MemoryAreaLength = (ULONG_PTR)MemoryArea->EndingAddress -
|
||||||
(ULONG_PTR)MemoryArea->StartingAddress;
|
(ULONG_PTR)MemoryArea->StartingAddress;
|
||||||
|
|
||||||
MmInitialiseRegion(&MemoryArea->Data.VirtualMemoryData.RegionListHead,
|
MmInitializeRegion(&MemoryArea->Data.VirtualMemoryData.RegionListHead,
|
||||||
MemoryAreaLength, Type, Protect);
|
MemoryAreaLength, Type, Protect);
|
||||||
|
|
||||||
if ((AllocationType & MEM_COMMIT) &&
|
if ((AllocationType & MEM_COMMIT) &&
|
||||||
|
|
|
@ -61,7 +61,7 @@ MiCreatePebOrTeb(PEPROCESS Process,
|
||||||
} while (Status != STATUS_SUCCESS);
|
} while (Status != STATUS_SUCCESS);
|
||||||
|
|
||||||
/* Initialize the Region */
|
/* Initialize the Region */
|
||||||
MmInitialiseRegion(&MemoryArea->Data.VirtualMemoryData.RegionListHead,
|
MmInitializeRegion(&MemoryArea->Data.VirtualMemoryData.RegionListHead,
|
||||||
PAGE_SIZE,
|
PAGE_SIZE,
|
||||||
MEM_COMMIT,
|
MEM_COMMIT,
|
||||||
PAGE_READWRITE);
|
PAGE_READWRITE);
|
||||||
|
@ -194,7 +194,7 @@ MmCreatePeb(PEPROCESS Process)
|
||||||
{
|
{
|
||||||
PPEB Peb = NULL;
|
PPEB Peb = NULL;
|
||||||
LARGE_INTEGER SectionOffset;
|
LARGE_INTEGER SectionOffset;
|
||||||
ULONG ViewSize = 0;
|
SIZE_T ViewSize = 0;
|
||||||
PVOID TableBase = NULL;
|
PVOID TableBase = NULL;
|
||||||
PIMAGE_NT_HEADERS NtHeaders;
|
PIMAGE_NT_HEADERS NtHeaders;
|
||||||
PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigData;
|
PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigData;
|
||||||
|
@ -385,7 +385,7 @@ MmCreateProcessAddressSpace(IN PEPROCESS Process,
|
||||||
PVOID BaseAddress;
|
PVOID BaseAddress;
|
||||||
PMEMORY_AREA MemoryArea;
|
PMEMORY_AREA MemoryArea;
|
||||||
PHYSICAL_ADDRESS BoundaryAddressMultiple;
|
PHYSICAL_ADDRESS BoundaryAddressMultiple;
|
||||||
ULONG ViewSize = 0;
|
SIZE_T ViewSize = 0;
|
||||||
PVOID ImageBase = 0;
|
PVOID ImageBase = 0;
|
||||||
BoundaryAddressMultiple.QuadPart = 0;
|
BoundaryAddressMultiple.QuadPart = 0;
|
||||||
|
|
||||||
|
|
|
@ -239,7 +239,7 @@ MmAlterRegion(PMADDRESS_SPACE AddressSpace, PVOID BaseAddress,
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
MmInitialiseRegion(PLIST_ENTRY RegionListHead, ULONG Length, ULONG Type,
|
MmInitializeRegion(PLIST_ENTRY RegionListHead, ULONG Length, ULONG Type,
|
||||||
ULONG Protect)
|
ULONG Protect)
|
||||||
{
|
{
|
||||||
PMM_REGION Region;
|
PMM_REGION Region;
|
||||||
|
|
|
@ -3488,7 +3488,7 @@ MmMapViewOfSegment(PMADDRESS_SPACE AddressSpace,
|
||||||
PSECTION_OBJECT Section,
|
PSECTION_OBJECT Section,
|
||||||
PMM_SECTION_SEGMENT Segment,
|
PMM_SECTION_SEGMENT Segment,
|
||||||
PVOID* BaseAddress,
|
PVOID* BaseAddress,
|
||||||
ULONG ViewSize,
|
SIZE_T ViewSize,
|
||||||
ULONG Protect,
|
ULONG Protect,
|
||||||
ULONG ViewOffset,
|
ULONG ViewOffset,
|
||||||
ULONG AllocationType)
|
ULONG AllocationType)
|
||||||
|
@ -3521,7 +3521,7 @@ MmMapViewOfSegment(PMADDRESS_SPACE AddressSpace,
|
||||||
MArea->Data.SectionData.Section = Section;
|
MArea->Data.SectionData.Section = Section;
|
||||||
MArea->Data.SectionData.ViewOffset = ViewOffset;
|
MArea->Data.SectionData.ViewOffset = ViewOffset;
|
||||||
MArea->Data.SectionData.WriteCopyView = FALSE;
|
MArea->Data.SectionData.WriteCopyView = FALSE;
|
||||||
MmInitialiseRegion(&MArea->Data.SectionData.RegionListHead,
|
MmInitializeRegion(&MArea->Data.SectionData.RegionListHead,
|
||||||
ViewSize, 0, Protect);
|
ViewSize, 0, Protect);
|
||||||
|
|
||||||
return(STATUS_SUCCESS);
|
return(STATUS_SUCCESS);
|
||||||
|
@ -3584,14 +3584,14 @@ NtMapViewOfSection(IN HANDLE SectionHandle,
|
||||||
IN ULONG ZeroBits OPTIONAL,
|
IN ULONG ZeroBits OPTIONAL,
|
||||||
IN ULONG CommitSize,
|
IN ULONG CommitSize,
|
||||||
IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
|
IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
|
||||||
IN OUT PULONG ViewSize,
|
IN OUT PSIZE_T ViewSize,
|
||||||
IN SECTION_INHERIT InheritDisposition,
|
IN SECTION_INHERIT InheritDisposition,
|
||||||
IN ULONG AllocationType OPTIONAL,
|
IN ULONG AllocationType OPTIONAL,
|
||||||
IN ULONG Protect)
|
IN ULONG Protect)
|
||||||
{
|
{
|
||||||
PVOID SafeBaseAddress;
|
PVOID SafeBaseAddress;
|
||||||
LARGE_INTEGER SafeSectionOffset;
|
LARGE_INTEGER SafeSectionOffset;
|
||||||
ULONG SafeViewSize;
|
SIZE_T SafeViewSize;
|
||||||
PSECTION_OBJECT Section;
|
PSECTION_OBJECT Section;
|
||||||
PEPROCESS Process;
|
PEPROCESS Process;
|
||||||
KPROCESSOR_MODE PreviousMode;
|
KPROCESSOR_MODE PreviousMode;
|
||||||
|
@ -3642,7 +3642,7 @@ NtMapViewOfSection(IN HANDLE SectionHandle,
|
||||||
ProbeForWriteLargeInteger(SectionOffset);
|
ProbeForWriteLargeInteger(SectionOffset);
|
||||||
SafeSectionOffset = *SectionOffset;
|
SafeSectionOffset = *SectionOffset;
|
||||||
}
|
}
|
||||||
ProbeForWriteUlong(ViewSize);
|
ProbeForWriteSize_t(ViewSize);
|
||||||
SafeViewSize = *ViewSize;
|
SafeViewSize = *ViewSize;
|
||||||
}
|
}
|
||||||
_SEH_HANDLE
|
_SEH_HANDLE
|
||||||
|
@ -4404,7 +4404,7 @@ MmMapViewOfSection(IN PVOID SectionObject,
|
||||||
IN ULONG ZeroBits,
|
IN ULONG ZeroBits,
|
||||||
IN ULONG CommitSize,
|
IN ULONG CommitSize,
|
||||||
IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
|
IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
|
||||||
IN OUT PULONG ViewSize,
|
IN OUT PSIZE_T ViewSize,
|
||||||
IN SECTION_INHERIT InheritDisposition,
|
IN SECTION_INHERIT InheritDisposition,
|
||||||
IN ULONG AllocationType,
|
IN ULONG AllocationType,
|
||||||
IN ULONG Protect)
|
IN ULONG Protect)
|
||||||
|
|
|
@ -400,7 +400,7 @@ PspMapSystemDll(PEPROCESS Process,
|
||||||
PVOID *DllBase)
|
PVOID *DllBase)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
ULONG ViewSize = 0;
|
SIZE_T ViewSize = 0;
|
||||||
PVOID ImageBase = 0;
|
PVOID ImageBase = 0;
|
||||||
|
|
||||||
/* Map the System DLL */
|
/* Map the System DLL */
|
||||||
|
|
|
@ -1898,16 +1898,16 @@ BOOL WINAPI UpdateResourceA(HANDLE,LPCSTR,LPCSTR,WORD,PVOID,DWORD);
|
||||||
BOOL WINAPI UpdateResourceW(HANDLE,LPCWSTR,LPCWSTR,WORD,PVOID,DWORD);
|
BOOL WINAPI UpdateResourceW(HANDLE,LPCWSTR,LPCWSTR,WORD,PVOID,DWORD);
|
||||||
BOOL WINAPI VerifyVersionInfoA(LPOSVERSIONINFOEXA,DWORD,DWORDLONG);
|
BOOL WINAPI VerifyVersionInfoA(LPOSVERSIONINFOEXA,DWORD,DWORDLONG);
|
||||||
BOOL WINAPI VerifyVersionInfoW(LPOSVERSIONINFOEXW,DWORD,DWORDLONG);
|
BOOL WINAPI VerifyVersionInfoW(LPOSVERSIONINFOEXW,DWORD,DWORDLONG);
|
||||||
PVOID WINAPI VirtualAlloc(PVOID,DWORD,DWORD,DWORD);
|
PVOID WINAPI VirtualAlloc(PVOID,SIZE_T,DWORD,DWORD);
|
||||||
PVOID WINAPI VirtualAllocEx(HANDLE,PVOID,DWORD,DWORD,DWORD);
|
PVOID WINAPI VirtualAllocEx(HANDLE,PVOID,SIZE_T,DWORD,DWORD);
|
||||||
BOOL WINAPI VirtualFree(PVOID,DWORD,DWORD);
|
BOOL WINAPI VirtualFree(PVOID,SIZE_T,DWORD);
|
||||||
BOOL WINAPI VirtualFreeEx(HANDLE,PVOID,DWORD,DWORD);
|
BOOL WINAPI VirtualFreeEx(HANDLE,PVOID,SIZE_T,DWORD);
|
||||||
BOOL WINAPI VirtualLock(PVOID,DWORD);
|
BOOL WINAPI VirtualLock(PVOID,SIZE_T);
|
||||||
BOOL WINAPI VirtualProtect(PVOID,DWORD,DWORD,PDWORD);
|
BOOL WINAPI VirtualProtect(PVOID,SIZE_T,DWORD,PDWORD);
|
||||||
BOOL WINAPI VirtualProtectEx(HANDLE,PVOID,DWORD,DWORD,PDWORD);
|
BOOL WINAPI VirtualProtectEx(HANDLE,PVOID,SIZE_T,DWORD,PDWORD);
|
||||||
DWORD WINAPI VirtualQuery(LPCVOID,PMEMORY_BASIC_INFORMATION,DWORD);
|
DWORD WINAPI VirtualQuery(LPCVOID,PMEMORY_BASIC_INFORMATION,SIZE_T);
|
||||||
DWORD WINAPI VirtualQueryEx(HANDLE,LPCVOID,PMEMORY_BASIC_INFORMATION,DWORD);
|
DWORD WINAPI VirtualQueryEx(HANDLE,LPCVOID,PMEMORY_BASIC_INFORMATION,SIZE_T);
|
||||||
BOOL WINAPI VirtualUnlock(PVOID,DWORD);
|
BOOL WINAPI VirtualUnlock(PVOID,SIZE_T);
|
||||||
BOOL WINAPI WaitCommEvent(HANDLE,PDWORD,LPOVERLAPPED);
|
BOOL WINAPI WaitCommEvent(HANDLE,PDWORD,LPOVERLAPPED);
|
||||||
BOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT,DWORD);
|
BOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT,DWORD);
|
||||||
DWORD WINAPI WaitForMultipleObjects(DWORD,const HANDLE*,BOOL,DWORD);
|
DWORD WINAPI WaitForMultipleObjects(DWORD,const HANDLE*,BOOL,DWORD);
|
||||||
|
|
|
@ -249,7 +249,9 @@ typedef CONST void *PCVOID,*LPCVOID;
|
||||||
typedef int INT;
|
typedef int INT;
|
||||||
typedef unsigned int UINT,*PUINT,*LPUINT;
|
typedef unsigned int UINT,*PUINT,*LPUINT;
|
||||||
|
|
||||||
|
#ifndef NT_INCLUDED
|
||||||
#include <winnt.h>
|
#include <winnt.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef UINT_PTR WPARAM;
|
typedef UINT_PTR WPARAM;
|
||||||
typedef LONG_PTR LPARAM;
|
typedef LONG_PTR LPARAM;
|
||||||
|
|
Loading…
Reference in a new issue