}
/* Set output string */
- DosName->Length = VolumePathPtr->MultiSzLength;
- DosName->MaximumLength = VolumePathPtr->MultiSzLength + sizeof(UNICODE_NULL);
+ DosName->Length = (USHORT)VolumePathPtr->MultiSzLength;
+ DosName->MaximumLength = (USHORT)VolumePathPtr->MultiSzLength + sizeof(UNICODE_NULL);
/* Our MOUNTMGR_VOLUME_PATHS will be used as output buffer */
DosName->Buffer = (PWSTR)VolumePathPtr;
/* Move name at the begin, RtlMoveMemory is OK with overlapping */
while (*IdBuffer)
{
- ULONG StringLength = (ULONG)wcslen(IdBuffer) + 1, Index;
+ USHORT StringLength = (USHORT)wcslen(IdBuffer) + 1, Index;
IopFixupDeviceId(IdBuffer);
ChildIdNameU.Buffer = IdBuffer;
ChildIdNameU.MaximumLength = ChildIdNameU.Length = (StringLength - 1) * sizeof(WCHAR);
RegKeyNameU.Buffer = BasicInfo->Name;
- RegKeyNameU.MaximumLength = RegKeyNameU.Length = BasicInfo->NameLength;
+ RegKeyNameU.MaximumLength = RegKeyNameU.Length = (USHORT)BasicInfo->NameLength;
if (RtlEqualUnicodeString(&ChildIdNameU, &RegKeyNameU, TRUE))
{
DPRINT1(" 0x%p - 0x%p\t%s\n",
MmNonPagedPoolStart,
(ULONG_PTR)MmNonPagedPoolStart + MmSizeOfNonPagedPoolInBytes,
- "ARM³ Non Paged Pool");
+ "ARM3 Non Paged Pool");
DPRINT1(" 0x%p - 0x%p\t%s\n",
MiSystemViewStart,
(ULONG_PTR)MiSystemViewStart + MmSystemViewSize,
DPRINT1(" 0x%p - 0x%p\t%s\n",
MmPagedPoolStart,
(ULONG_PTR)MmPagedPoolStart + MmSizeOfPagedPoolInBytes,
- "ARM³ Paged Pool");
+ "ARM3 Paged Pool");
DPRINT1(" 0x%p - 0x%p\t%s\n",
MmNonPagedSystemStart, MmNonPagedPoolExpansionStart,
"System PTE Space");
/* Protect write in SEH */
_SEH2_TRY
{
- /* Return the count of handles */
+ /* Return debug port's handle */
*(PHANDLE)ProcessInformation = DebugPort;
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
/* Protect write in SEH */
_SEH2_TRY
{
- /* Return the count of handles */
+ /* Return FALSE -- we don't support this */
*(PULONG)ProcessInformation = FALSE;
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
break;
}
- /* Indicate success */
- Status = STATUS_SUCCESS;
+ /* Reference the process */
+ Status = ObReferenceObjectByHandle(ProcessHandle,
+ PROCESS_QUERY_INFORMATION,
+ PsProcessType,
+ PreviousMode,
+ (PVOID*)&Process,
+ NULL);
+ if (!NT_SUCCESS(Status)) break;
/* Protect write in SEH */
_SEH2_TRY
Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
+
+ /* Dereference the process */
+ ObDereferenceObject(Process);
break;
case ProcessWow64Information:
PVOID ExceptionPort;
ULONG Break;
KAFFINITY ValidAffinity, Affinity = 0;
- ULONG DefaultHardErrorMode = 0, BasePriority = 0, MemoryPriority = 0;
- ULONG DisableBoost = 0, DebugFlags = 0, EnableFixup = 0, Boost = 0;
+ KPRIORITY BasePriority = 0;
+ UCHAR MemoryPriority = 0;
+ BOOLEAN DisableBoost = 0;
+ ULONG DefaultHardErrorMode = 0;
+ ULONG DebugFlags = 0, EnableFixup = 0, Boost = 0;
ULONG NoExecute = 0, VdmPower = 0;
BOOLEAN HasPrivilege;
PLIST_ENTRY Next;
/* Enter SEH for direct buffer read */
_SEH2_TRY
{
- BasePriority = *(PULONG)ProcessInformation;
+ BasePriority = *(KPRIORITY*)ProcessInformation;
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
/* Enter SEH for direct buffer read */
_SEH2_TRY
{
- DisableBoost = *(PULONG)ProcessInformation;
+ DisableBoost = *(PBOOLEAN)ProcessInformation;
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
/* Only supported on x86 */
#if defined (_X86_)
Ke386SetIOPL();
+#else
+ Status = STATUS_NOT_IMPLEMENTED;
#endif
/* Done */
break;