[FORMATTING] Consistency.

svn path=/trunk/; revision=29827
This commit is contained in:
Mike Nordell 2007-10-23 11:08:18 +00:00
parent c4720317ab
commit 821c3e5125

View file

@ -111,7 +111,7 @@ NtLockVirtualMemory(HANDLE ProcessHandle,
NTSTATUS FASTCALL
MiQueryVirtualMemory (IN HANDLE ProcessHandle,
MiQueryVirtualMemory(IN HANDLE ProcessHandle,
IN PVOID Address,
IN MEMORY_INFORMATION_CLASS VirtualMemoryInformationClass,
OUT PVOID VirtualMemoryInformation,
@ -179,10 +179,12 @@ MiQueryVirtualMemory (IN HANDLE ProcessHandle,
Status = MmQueryAnonMem(MemoryArea, Address, Info,
ResultLength);
break;
case MEMORY_AREA_SECTION_VIEW:
Status = MmQuerySectionView(MemoryArea, Address, Info,
ResultLength);
break;
case MEMORY_AREA_NO_ACCESS:
Info->Type = MEM_PRIVATE;
Info->State = MEM_RESERVE;
@ -195,6 +197,7 @@ MiQueryVirtualMemory (IN HANDLE ProcessHandle,
Status = STATUS_SUCCESS;
*ResultLength = sizeof(MEMORY_BASIC_INFORMATION);
break;
case MEMORY_AREA_SHARED_DATA:
Info->Type = MEM_PRIVATE;
Info->State = MEM_COMMIT;
@ -207,6 +210,7 @@ MiQueryVirtualMemory (IN HANDLE ProcessHandle,
Status = STATUS_SUCCESS;
*ResultLength = sizeof(MEMORY_BASIC_INFORMATION);
break;
case MEMORY_AREA_SYSTEM:
Info->Type = 0;
Info->State = MEM_COMMIT;
@ -219,6 +223,7 @@ MiQueryVirtualMemory (IN HANDLE ProcessHandle,
Status = STATUS_SUCCESS;
*ResultLength = sizeof(MEMORY_BASIC_INFORMATION);
break;
case MEMORY_AREA_KERNEL_STACK:
Info->Type = 0;
Info->State = MEM_COMMIT;
@ -231,6 +236,7 @@ MiQueryVirtualMemory (IN HANDLE ProcessHandle,
Status = STATUS_SUCCESS;
*ResultLength = sizeof(MEMORY_BASIC_INFORMATION);
break;
case MEMORY_AREA_PAGED_POOL:
Info->Type = 0;
Info->State = MEM_COMMIT;
@ -243,6 +249,7 @@ MiQueryVirtualMemory (IN HANDLE ProcessHandle,
Status = STATUS_SUCCESS;
*ResultLength = sizeof(MEMORY_BASIC_INFORMATION);
break;
default:
DPRINT1("unhandled memory area type: 0x%x\n", MemoryArea->Type);
Status = STATUS_UNSUCCESSFUL;
@ -276,7 +283,7 @@ MiQueryVirtualMemory (IN HANDLE ProcessHandle,
*
*/
NTSTATUS STDCALL
NtQueryVirtualMemory (IN HANDLE ProcessHandle,
NtQueryVirtualMemory(IN HANDLE ProcessHandle,
IN PVOID Address,
IN MEMORY_INFORMATION_CLASS VirtualMemoryInformationClass,
OUT PVOID VirtualMemoryInformation,
@ -324,7 +331,7 @@ NtQueryVirtualMemory (IN HANDLE ProcessHandle,
return STATUS_INVALID_PARAMETER;
}
Status = MiQueryVirtualMemory ( ProcessHandle,
Status = MiQueryVirtualMemory(ProcessHandle,
Address,
VirtualMemoryInformationClass,
&VirtualMemoryInfo,
@ -642,11 +649,10 @@ NtReadVirtualMemory(IN HANDLE ProcessHandle,
ObDereferenceObject(Process);
return(STATUS_NO_MEMORY);
}
_SEH_TRY
{
MmProbeAndLockPages(Mdl,
PreviousMode,
IoWriteAccess);
MmProbeAndLockPages(Mdl, PreviousMode, IoWriteAccess);
}
_SEH_HANDLE
{
@ -661,14 +667,18 @@ NtReadVirtualMemory(IN HANDLE ProcessHandle,
SystemAddress = MmGetSystemAddressForMdl(Mdl);
Status = STATUS_SUCCESS;
_SEH_TRY {
_SEH_TRY
{
Status = STATUS_PARTIAL_COPY;
RtlCopyMemory(SystemAddress, BaseAddress, NumberOfBytesToRead);
Status = STATUS_SUCCESS;
} _SEH_HANDLE {
}
_SEH_HANDLE
{
if(Status != STATUS_PARTIAL_COPY)
Status = _SEH_GetExceptionCode();
} _SEH_END;
}
_SEH_END;
KeDetachProcess();
@ -683,7 +693,7 @@ NtReadVirtualMemory(IN HANDLE ProcessHandle,
ObDereferenceObject(Process);
if((NT_SUCCESS(Status) || Status == STATUS_PARTIAL_COPY) &&
if ((NT_SUCCESS(Status) || Status == STATUS_PARTIAL_COPY) &&
NumberOfBytesRead != NULL)
{
_SEH_TRY
@ -854,7 +864,7 @@ NtWriteVirtualMemory(IN HANDLE ProcessHandle,
Mdl = MmCreateMdl(NULL,
Buffer,
NumberOfBytesToWrite);
if(Mdl == NULL)
if (Mdl == NULL)
{
ObDereferenceObject(Process);
return(STATUS_NO_MEMORY);
@ -862,9 +872,7 @@ NtWriteVirtualMemory(IN HANDLE ProcessHandle,
_SEH_TRY
{
/* Map the MDL. */
MmProbeAndLockPages(Mdl,
UserMode,
IoReadAccess);
MmProbeAndLockPages(Mdl, UserMode, IoReadAccess);
}
_SEH_HANDLE
{
@ -937,7 +945,7 @@ NtWriteVirtualMemory(IN HANDLE ProcessHandle,
PVOID
STDCALL
MmGetVirtualForPhysical (
MmGetVirtualForPhysical(
IN PHYSICAL_ADDRESS PhysicalAddress
)
{
@ -950,7 +958,7 @@ MmGetVirtualForPhysical (
* @unimplemented
*/
PVOID STDCALL
MmSecureVirtualMemory (PVOID Address,
MmSecureVirtualMemory(PVOID Address,
SIZE_T Length,
ULONG Mode)
{
@ -986,7 +994,7 @@ MmUnsecureVirtualMemory(PVOID SecureMem)
* @implemented
*/
VOID STDCALL
ProbeForRead (IN CONST VOID *Address,
ProbeForRead(IN CONST VOID *Address,
IN ULONG Length,
IN ULONG Alignment)
{
@ -1011,7 +1019,7 @@ ProbeForRead (IN CONST VOID *Address,
* @implemented
*/
VOID STDCALL
ProbeForWrite (IN PVOID Address,
ProbeForWrite(IN PVOID Address,
IN ULONG Length,
IN ULONG Alignment)
{