mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:45:50 +00:00
- Formatting fix. No code change
svn path=/trunk/; revision=38566
This commit is contained in:
parent
2494ca79f9
commit
6c670fb344
1 changed files with 956 additions and 973 deletions
|
@ -216,7 +216,7 @@ ExVerifySuite(SUITE_TYPE SuiteType)
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
|
NtQuerySystemEnvironmentValue(IN PUNICODE_STRING VariableName,
|
||||||
OUT PWSTR ValueBuffer,
|
OUT PWSTR ValueBuffer,
|
||||||
IN ULONG ValueBufferLength,
|
IN ULONG ValueBufferLength,
|
||||||
IN OUT PULONG ReturnLength OPTIONAL)
|
IN OUT PULONG ReturnLength OPTIONAL)
|
||||||
|
@ -234,20 +234,19 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
|
||||||
|
|
||||||
PreviousMode = ExGetPreviousMode();
|
PreviousMode = ExGetPreviousMode();
|
||||||
|
|
||||||
if(PreviousMode != KernelMode)
|
if (PreviousMode != KernelMode)
|
||||||
{
|
{
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
ProbeForRead(VariableName,
|
ProbeForRead(VariableName,
|
||||||
sizeof(UNICODE_STRING),
|
sizeof(UNICODE_STRING),
|
||||||
sizeof(ULONG));
|
sizeof(ULONG));
|
||||||
|
|
||||||
ProbeForWrite(ValueBuffer,
|
ProbeForWrite(ValueBuffer,
|
||||||
ValueBufferLength,
|
ValueBufferLength,
|
||||||
sizeof(WCHAR));
|
sizeof(WCHAR));
|
||||||
if(ReturnLength != NULL)
|
|
||||||
{
|
if (ReturnLength != NULL) ProbeForWriteUlong(ReturnLength);
|
||||||
ProbeForWriteUlong(ReturnLength);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_SEH2_EXCEPT(ExSystemExceptionFilter())
|
_SEH2_EXCEPT(ExSystemExceptionFilter())
|
||||||
{
|
{
|
||||||
|
@ -255,10 +254,7 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
|
||||||
}
|
}
|
||||||
_SEH2_END;
|
_SEH2_END;
|
||||||
|
|
||||||
if(!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status)) return Status;
|
||||||
{
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -267,16 +263,15 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
|
||||||
Status = ProbeAndCaptureUnicodeString(&WName,
|
Status = ProbeAndCaptureUnicodeString(&WName,
|
||||||
PreviousMode,
|
PreviousMode,
|
||||||
VariableName);
|
VariableName);
|
||||||
if(NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* according to ntinternals the SeSystemEnvironmentName privilege is required!
|
* according to ntinternals the SeSystemEnvironmentName privilege is required!
|
||||||
*/
|
*/
|
||||||
if(!SeSinglePrivilegeCheck(SeSystemEnvironmentPrivilege,
|
if (!SeSinglePrivilegeCheck(SeSystemEnvironmentPrivilege,
|
||||||
PreviousMode))
|
PreviousMode))
|
||||||
{
|
{
|
||||||
ReleaseCapturedUnicodeString(&WName,
|
ReleaseCapturedUnicodeString(&WName, PreviousMode);
|
||||||
PreviousMode);
|
|
||||||
DPRINT1("NtQuerySystemEnvironmentValue: Caller requires the SeSystemEnvironmentPrivilege privilege!\n");
|
DPRINT1("NtQuerySystemEnvironmentValue: Caller requires the SeSystemEnvironmentPrivilege privilege!\n");
|
||||||
return STATUS_PRIVILEGE_NOT_HELD;
|
return STATUS_PRIVILEGE_NOT_HELD;
|
||||||
}
|
}
|
||||||
|
@ -285,12 +280,9 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
|
||||||
* convert the value name to ansi
|
* convert the value name to ansi
|
||||||
*/
|
*/
|
||||||
Status = RtlUnicodeStringToAnsiString(&AName, &WName, TRUE);
|
Status = RtlUnicodeStringToAnsiString(&AName, &WName, TRUE);
|
||||||
ReleaseCapturedUnicodeString(&WName,
|
ReleaseCapturedUnicodeString(&WName, PreviousMode);
|
||||||
PreviousMode);
|
|
||||||
if(!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status)) return Status;
|
||||||
{
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create a temporary buffer for the value
|
* Create a temporary buffer for the value
|
||||||
|
@ -308,7 +300,7 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
|
||||||
Result = HalGetEnvironmentVariable(AName.Buffer,
|
Result = HalGetEnvironmentVariable(AName.Buffer,
|
||||||
(USHORT)ValueBufferLength,
|
(USHORT)ValueBufferLength,
|
||||||
Value);
|
Value);
|
||||||
if(!Result)
|
if (!Result)
|
||||||
{
|
{
|
||||||
RtlFreeAnsiString(&AName);
|
RtlFreeAnsiString(&AName);
|
||||||
ExFreePool(Value);
|
ExFreePool(Value);
|
||||||
|
@ -330,7 +322,7 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
|
||||||
}
|
}
|
||||||
_SEH2_END;
|
_SEH2_END;
|
||||||
|
|
||||||
if(NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Copy the result back to the caller.
|
* Copy the result back to the caller.
|
||||||
|
@ -339,7 +331,7 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
|
||||||
{
|
{
|
||||||
RtlCopyMemory(ValueBuffer, WValue.Buffer, WValue.Length);
|
RtlCopyMemory(ValueBuffer, WValue.Buffer, WValue.Length);
|
||||||
ValueBuffer[WValue.Length / sizeof(WCHAR)] = L'\0';
|
ValueBuffer[WValue.Length / sizeof(WCHAR)] = L'\0';
|
||||||
if(ReturnLength != NULL)
|
if (ReturnLength != NULL)
|
||||||
{
|
{
|
||||||
*ReturnLength = WValue.Length + sizeof(WCHAR);
|
*ReturnLength = WValue.Length + sizeof(WCHAR);
|
||||||
}
|
}
|
||||||
|
@ -364,8 +356,9 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS NTAPI
|
NTSTATUS
|
||||||
NtSetSystemEnvironmentValue (IN PUNICODE_STRING VariableName,
|
NTAPI
|
||||||
|
NtSetSystemEnvironmentValue(IN PUNICODE_STRING VariableName,
|
||||||
IN PUNICODE_STRING Value)
|
IN PUNICODE_STRING Value)
|
||||||
{
|
{
|
||||||
UNICODE_STRING CapturedName, CapturedValue;
|
UNICODE_STRING CapturedName, CapturedValue;
|
||||||
|
@ -383,17 +376,17 @@ NtSetSystemEnvironmentValue (IN PUNICODE_STRING VariableName,
|
||||||
Status = ProbeAndCaptureUnicodeString(&CapturedName,
|
Status = ProbeAndCaptureUnicodeString(&CapturedName,
|
||||||
PreviousMode,
|
PreviousMode,
|
||||||
VariableName);
|
VariableName);
|
||||||
if(NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
Status = ProbeAndCaptureUnicodeString(&CapturedValue,
|
Status = ProbeAndCaptureUnicodeString(&CapturedValue,
|
||||||
PreviousMode,
|
PreviousMode,
|
||||||
Value);
|
Value);
|
||||||
if(NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* according to ntinternals the SeSystemEnvironmentName privilege is required!
|
* according to ntinternals the SeSystemEnvironmentName privilege is required!
|
||||||
*/
|
*/
|
||||||
if(SeSinglePrivilegeCheck(SeSystemEnvironmentPrivilege,
|
if (SeSinglePrivilegeCheck(SeSystemEnvironmentPrivilege,
|
||||||
PreviousMode))
|
PreviousMode))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -402,12 +395,12 @@ NtSetSystemEnvironmentValue (IN PUNICODE_STRING VariableName,
|
||||||
Status = RtlUnicodeStringToAnsiString(&AName,
|
Status = RtlUnicodeStringToAnsiString(&AName,
|
||||||
&CapturedName,
|
&CapturedName,
|
||||||
TRUE);
|
TRUE);
|
||||||
if(NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
Status = RtlUnicodeStringToAnsiString(&AValue,
|
Status = RtlUnicodeStringToAnsiString(&AValue,
|
||||||
&CapturedValue,
|
&CapturedValue,
|
||||||
TRUE);
|
TRUE);
|
||||||
if(NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
ARC_STATUS Result = HalSetEnvironmentVariable(AName.Buffer,
|
ARC_STATUS Result = HalSetEnvironmentVariable(AName.Buffer,
|
||||||
AValue.Buffer);
|
AValue.Buffer);
|
||||||
|
@ -485,14 +478,14 @@ QSI_DEF(SystemBasicInformation)
|
||||||
PSYSTEM_BASIC_INFORMATION Sbi
|
PSYSTEM_BASIC_INFORMATION Sbi
|
||||||
= (PSYSTEM_BASIC_INFORMATION) Buffer;
|
= (PSYSTEM_BASIC_INFORMATION) Buffer;
|
||||||
|
|
||||||
*ReqSize = sizeof (SYSTEM_BASIC_INFORMATION);
|
*ReqSize = sizeof(SYSTEM_BASIC_INFORMATION);
|
||||||
/*
|
|
||||||
* Check user buffer's size
|
/* Check user buffer's size */
|
||||||
*/
|
if (Size != sizeof(SYSTEM_BASIC_INFORMATION))
|
||||||
if (Size != sizeof (SYSTEM_BASIC_INFORMATION))
|
|
||||||
{
|
{
|
||||||
return (STATUS_INFO_LENGTH_MISMATCH);
|
return STATUS_INFO_LENGTH_MISMATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
RtlZeroMemory(Sbi, Size);
|
RtlZeroMemory(Sbi, Size);
|
||||||
Sbi->Reserved = 0;
|
Sbi->Reserved = 0;
|
||||||
Sbi->TimerResolution = KeMaximumIncrement;
|
Sbi->TimerResolution = KeMaximumIncrement;
|
||||||
|
@ -505,7 +498,8 @@ QSI_DEF(SystemBasicInformation)
|
||||||
Sbi->MaximumUserModeAddress = (ULONG_PTR)MmHighestUserAddress;
|
Sbi->MaximumUserModeAddress = (ULONG_PTR)MmHighestUserAddress;
|
||||||
Sbi->ActiveProcessorsAffinityMask = KeActiveProcessors;
|
Sbi->ActiveProcessorsAffinityMask = KeActiveProcessors;
|
||||||
Sbi->NumberOfProcessors = KeNumberProcessors;
|
Sbi->NumberOfProcessors = KeNumberProcessors;
|
||||||
return (STATUS_SUCCESS);
|
|
||||||
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 1 - Processor Information */
|
/* Class 1 - Processor Information */
|
||||||
|
@ -514,13 +508,13 @@ QSI_DEF(SystemProcessorInformation)
|
||||||
PSYSTEM_PROCESSOR_INFORMATION Spi
|
PSYSTEM_PROCESSOR_INFORMATION Spi
|
||||||
= (PSYSTEM_PROCESSOR_INFORMATION) Buffer;
|
= (PSYSTEM_PROCESSOR_INFORMATION) Buffer;
|
||||||
PKPRCB Prcb;
|
PKPRCB Prcb;
|
||||||
*ReqSize = sizeof (SYSTEM_PROCESSOR_INFORMATION);
|
|
||||||
/*
|
*ReqSize = sizeof(SYSTEM_PROCESSOR_INFORMATION);
|
||||||
* Check user buffer's size
|
|
||||||
*/
|
/* Check user buffer's size */
|
||||||
if (Size < sizeof (SYSTEM_PROCESSOR_INFORMATION))
|
if (Size < sizeof(SYSTEM_PROCESSOR_INFORMATION))
|
||||||
{
|
{
|
||||||
return (STATUS_INFO_LENGTH_MISMATCH);
|
return STATUS_INFO_LENGTH_MISMATCH;
|
||||||
}
|
}
|
||||||
Prcb = KeGetCurrentPrcb();
|
Prcb = KeGetCurrentPrcb();
|
||||||
Spi->ProcessorArchitecture = KeProcessorArchitecture;
|
Spi->ProcessorArchitecture = KeProcessorArchitecture;
|
||||||
|
@ -532,7 +526,7 @@ QSI_DEF(SystemProcessorInformation)
|
||||||
DPRINT("Arch %d Level %d Rev 0x%x\n", Spi->ProcessorArchitecture,
|
DPRINT("Arch %d Level %d Rev 0x%x\n", Spi->ProcessorArchitecture,
|
||||||
Spi->ProcessorLevel, Spi->ProcessorRevision);
|
Spi->ProcessorLevel, Spi->ProcessorRevision);
|
||||||
|
|
||||||
return (STATUS_SUCCESS);
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 2 - Performance Information */
|
/* Class 2 - Performance Information */
|
||||||
|
@ -544,13 +538,12 @@ QSI_DEF(SystemPerformanceInformation)
|
||||||
|
|
||||||
PEPROCESS TheIdleProcess;
|
PEPROCESS TheIdleProcess;
|
||||||
|
|
||||||
*ReqSize = sizeof (SYSTEM_PERFORMANCE_INFORMATION);
|
*ReqSize = sizeof(SYSTEM_PERFORMANCE_INFORMATION);
|
||||||
/*
|
|
||||||
* Check user buffer's size
|
/* Check user buffer's size */
|
||||||
*/
|
if (Size < sizeof(SYSTEM_PERFORMANCE_INFORMATION))
|
||||||
if (Size < sizeof (SYSTEM_PERFORMANCE_INFORMATION))
|
|
||||||
{
|
{
|
||||||
return (STATUS_INFO_LENGTH_MISMATCH);
|
return STATUS_INFO_LENGTH_MISMATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
TheIdleProcess = PsIdleProcess;
|
TheIdleProcess = PsIdleProcess;
|
||||||
|
@ -565,22 +558,21 @@ QSI_DEF(SystemPerformanceInformation)
|
||||||
Spi->IoOtherOperationCount = IoOtherOperationCount;
|
Spi->IoOtherOperationCount = IoOtherOperationCount;
|
||||||
|
|
||||||
Spi->AvailablePages = MmStats.NrFreePages;
|
Spi->AvailablePages = MmStats.NrFreePages;
|
||||||
/*
|
/*
|
||||||
Add up all the used "Committed" memory + pagefile.
|
* Add up all the used "Committed" memory + pagefile.
|
||||||
Not sure this is right. 8^\
|
* Not sure this is right. 8^\
|
||||||
*/
|
*/
|
||||||
Spi->CommittedPages = MiMemoryConsumers[MC_PPOOL].PagesUsed +
|
Spi->CommittedPages = MiMemoryConsumers[MC_PPOOL].PagesUsed +
|
||||||
MiMemoryConsumers[MC_NPPOOL].PagesUsed+
|
MiMemoryConsumers[MC_NPPOOL].PagesUsed +
|
||||||
MiMemoryConsumers[MC_CACHE].PagesUsed+
|
MiMemoryConsumers[MC_CACHE].PagesUsed +
|
||||||
MiMemoryConsumers[MC_USER].PagesUsed+
|
MiMemoryConsumers[MC_USER].PagesUsed +
|
||||||
MiUsedSwapPages;
|
|
||||||
/*
|
|
||||||
Add up the full system total + pagefile.
|
|
||||||
All this make Taskmgr happy but not sure it is the right numbers.
|
|
||||||
This too, fixes some of GlobalMemoryStatusEx numbers.
|
|
||||||
*/
|
|
||||||
Spi->CommitLimit = MmStats.NrTotalPages + MiFreeSwapPages +
|
|
||||||
MiUsedSwapPages;
|
MiUsedSwapPages;
|
||||||
|
/*
|
||||||
|
* Add up the full system total + pagefile.
|
||||||
|
* All this make Taskmgr happy but not sure it is the right numbers.
|
||||||
|
* This too, fixes some of GlobalMemoryStatusEx numbers.
|
||||||
|
*/
|
||||||
|
Spi->CommitLimit = MmStats.NrTotalPages + MiFreeSwapPages + MiUsedSwapPages;
|
||||||
|
|
||||||
Spi->PeakCommitment = 0; /* FIXME */
|
Spi->PeakCommitment = 0; /* FIXME */
|
||||||
Spi->PageFaultCount = 0; /* FIXME */
|
Spi->PageFaultCount = 0; /* FIXME */
|
||||||
|
@ -657,7 +649,7 @@ QSI_DEF(SystemPerformanceInformation)
|
||||||
Spi->SecondLevelTbFills = 0; /* FIXME */
|
Spi->SecondLevelTbFills = 0; /* FIXME */
|
||||||
Spi->SystemCalls = 0; /* FIXME */
|
Spi->SystemCalls = 0; /* FIXME */
|
||||||
|
|
||||||
return (STATUS_SUCCESS);
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 3 - Time Of Day Information */
|
/* Class 3 - Time Of Day Information */
|
||||||
|
@ -703,7 +695,7 @@ QSI_DEF(SystemPathInformation)
|
||||||
/* FIXME: QSI returns STATUS_BREAKPOINT. Why? */
|
/* FIXME: QSI returns STATUS_BREAKPOINT. Why? */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemPathInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemPathInformation not implemented\n");
|
||||||
|
|
||||||
return (STATUS_BREAKPOINT);
|
return STATUS_BREAKPOINT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 5 - Process Information */
|
/* Class 5 - Process Information */
|
||||||
|
@ -739,7 +731,7 @@ QSI_DEF(SystemProcessInformation)
|
||||||
PSYSTEM_PROCESS_INFORMATION SpiCur;
|
PSYSTEM_PROCESS_INFORMATION SpiCur;
|
||||||
int curSize;
|
int curSize;
|
||||||
ANSI_STRING imgName;
|
ANSI_STRING imgName;
|
||||||
int inLen=32; // image name len in bytes
|
int inLen = 32; // image name len in bytes
|
||||||
PLIST_ENTRY current_entry;
|
PLIST_ENTRY current_entry;
|
||||||
PETHREAD current;
|
PETHREAD current;
|
||||||
PSYSTEM_THREAD_INFORMATION ThreadInfo;
|
PSYSTEM_THREAD_INFORMATION ThreadInfo;
|
||||||
|
@ -865,7 +857,7 @@ QSI_DEF(SystemCallCountInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemCallCountInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemCallCountInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 7 - Device Information */
|
/* Class 7 - Device Information */
|
||||||
|
@ -875,16 +867,15 @@ QSI_DEF(SystemDeviceInformation)
|
||||||
= (PSYSTEM_DEVICE_INFORMATION) Buffer;
|
= (PSYSTEM_DEVICE_INFORMATION) Buffer;
|
||||||
PCONFIGURATION_INFORMATION ConfigInfo;
|
PCONFIGURATION_INFORMATION ConfigInfo;
|
||||||
|
|
||||||
*ReqSize = sizeof (SYSTEM_DEVICE_INFORMATION);
|
*ReqSize = sizeof(SYSTEM_DEVICE_INFORMATION);
|
||||||
/*
|
|
||||||
* Check user buffer's size
|
/* Check user buffer's size */
|
||||||
*/
|
if (Size < sizeof(SYSTEM_DEVICE_INFORMATION))
|
||||||
if (Size < sizeof (SYSTEM_DEVICE_INFORMATION))
|
|
||||||
{
|
{
|
||||||
return (STATUS_INFO_LENGTH_MISMATCH);
|
return STATUS_INFO_LENGTH_MISMATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigInfo = IoGetConfigurationInformation ();
|
ConfigInfo = IoGetConfigurationInformation();
|
||||||
|
|
||||||
Sdi->NumberOfDisks = ConfigInfo->DiskCount;
|
Sdi->NumberOfDisks = ConfigInfo->DiskCount;
|
||||||
Sdi->NumberOfFloppies = ConfigInfo->FloppyCount;
|
Sdi->NumberOfFloppies = ConfigInfo->FloppyCount;
|
||||||
|
@ -893,7 +884,7 @@ QSI_DEF(SystemDeviceInformation)
|
||||||
Sdi->NumberOfSerialPorts = ConfigInfo->SerialCount;
|
Sdi->NumberOfSerialPorts = ConfigInfo->SerialCount;
|
||||||
Sdi->NumberOfParallelPorts = ConfigInfo->ParallelCount;
|
Sdi->NumberOfParallelPorts = ConfigInfo->ParallelCount;
|
||||||
|
|
||||||
return (STATUS_SUCCESS);
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 8 - Processor Performance Information */
|
/* Class 8 - Processor Performance Information */
|
||||||
|
@ -907,7 +898,7 @@ QSI_DEF(SystemProcessorPerformanceInformation)
|
||||||
LARGE_INTEGER CurrentTime;
|
LARGE_INTEGER CurrentTime;
|
||||||
PKPRCB Prcb;
|
PKPRCB Prcb;
|
||||||
|
|
||||||
*ReqSize = KeNumberProcessors * sizeof (SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION);
|
*ReqSize = KeNumberProcessors * sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION);
|
||||||
|
|
||||||
/* Check user buffer's size */
|
/* Check user buffer's size */
|
||||||
if (Size < *ReqSize)
|
if (Size < *ReqSize)
|
||||||
|
@ -937,23 +928,23 @@ QSI_DEF(SystemProcessorPerformanceInformation)
|
||||||
/* Class 9 - Flags Information */
|
/* Class 9 - Flags Information */
|
||||||
QSI_DEF(SystemFlagsInformation)
|
QSI_DEF(SystemFlagsInformation)
|
||||||
{
|
{
|
||||||
if (sizeof (SYSTEM_FLAGS_INFORMATION) != Size)
|
if (sizeof(SYSTEM_FLAGS_INFORMATION) != Size)
|
||||||
{
|
{
|
||||||
* ReqSize = sizeof (SYSTEM_FLAGS_INFORMATION);
|
*ReqSize = sizeof(SYSTEM_FLAGS_INFORMATION);
|
||||||
return (STATUS_INFO_LENGTH_MISMATCH);
|
return (STATUS_INFO_LENGTH_MISMATCH);
|
||||||
}
|
}
|
||||||
((PSYSTEM_FLAGS_INFORMATION) Buffer)->Flags = NtGlobalFlag;
|
((PSYSTEM_FLAGS_INFORMATION) Buffer)->Flags = NtGlobalFlag;
|
||||||
return (STATUS_SUCCESS);
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
SSI_DEF(SystemFlagsInformation)
|
SSI_DEF(SystemFlagsInformation)
|
||||||
{
|
{
|
||||||
if (sizeof (SYSTEM_FLAGS_INFORMATION) != Size)
|
if (sizeof(SYSTEM_FLAGS_INFORMATION) != Size)
|
||||||
{
|
{
|
||||||
return (STATUS_INFO_LENGTH_MISMATCH);
|
return STATUS_INFO_LENGTH_MISMATCH;
|
||||||
}
|
}
|
||||||
NtGlobalFlag = ((PSYSTEM_FLAGS_INFORMATION) Buffer)->Flags;
|
NtGlobalFlag = ((PSYSTEM_FLAGS_INFORMATION) Buffer)->Flags;
|
||||||
return (STATUS_SUCCESS);
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 10 - Call Time Information */
|
/* Class 10 - Call Time Information */
|
||||||
|
@ -961,7 +952,7 @@ QSI_DEF(SystemCallTimeInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemCallTimeInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemCallTimeInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 11 - Module Information */
|
/* Class 11 - Module Information */
|
||||||
|
@ -980,7 +971,7 @@ QSI_DEF(SystemLocksInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemLocksInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemLocksInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 13 - Stack Trace Information */
|
/* Class 13 - Stack Trace Information */
|
||||||
|
@ -988,7 +979,7 @@ QSI_DEF(SystemStackTraceInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemStackTraceInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemStackTraceInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 14 - Paged Pool Information */
|
/* Class 14 - Paged Pool Information */
|
||||||
|
@ -996,7 +987,7 @@ QSI_DEF(SystemPagedPoolInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemPagedPoolInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemPagedPoolInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 15 - Non Paged Pool Information */
|
/* Class 15 - Non Paged Pool Information */
|
||||||
|
@ -1004,7 +995,7 @@ QSI_DEF(SystemNonPagedPoolInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemNonPagedPoolInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemNonPagedPoolInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1020,10 +1011,10 @@ QSI_DEF(SystemHandleInformation)
|
||||||
|
|
||||||
DPRINT("NtQuerySystemInformation - SystemHandleInformation\n");
|
DPRINT("NtQuerySystemInformation - SystemHandleInformation\n");
|
||||||
|
|
||||||
if (Size < sizeof (SYSTEM_HANDLE_INFORMATION))
|
if (Size < sizeof(SYSTEM_HANDLE_INFORMATION))
|
||||||
{
|
{
|
||||||
* ReqSize = sizeof (SYSTEM_HANDLE_INFORMATION);
|
*ReqSize = sizeof(SYSTEM_HANDLE_INFORMATION);
|
||||||
return (STATUS_INFO_LENGTH_MISMATCH);
|
return STATUS_INFO_LENGTH_MISMATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("SystemHandleInformation 1\n");
|
DPRINT("SystemHandleInformation 1\n");
|
||||||
|
@ -1037,9 +1028,9 @@ QSI_DEF(SystemHandleInformation)
|
||||||
hCount = hCount + (pr->ObjectTable ? ObpGetHandleCountByHandleTable(pr->ObjectTable) : 0);
|
hCount = hCount + (pr->ObjectTable ? ObpGetHandleCountByHandleTable(pr->ObjectTable) : 0);
|
||||||
pr = PsGetNextProcess(pr);
|
pr = PsGetNextProcess(pr);
|
||||||
|
|
||||||
if ((pr == syspr) || (pr == NULL))
|
if ((pr == syspr) || (pr == NULL)) break;
|
||||||
break;
|
}
|
||||||
} while ((pr != syspr) && (pr != NULL));
|
while ((pr != syspr) && (pr != NULL));
|
||||||
|
|
||||||
if(pr != NULL)
|
if(pr != NULL)
|
||||||
{
|
{
|
||||||
|
@ -1048,9 +1039,9 @@ QSI_DEF(SystemHandleInformation)
|
||||||
|
|
||||||
DPRINT("SystemHandleInformation 2\n");
|
DPRINT("SystemHandleInformation 2\n");
|
||||||
|
|
||||||
curSize = sizeof(SYSTEM_HANDLE_INFORMATION)+
|
curSize = sizeof(SYSTEM_HANDLE_INFORMATION) +
|
||||||
( (sizeof(SYSTEM_HANDLE_TABLE_ENTRY_INFO) * hCount) -
|
((sizeof(SYSTEM_HANDLE_TABLE_ENTRY_INFO) * hCount) -
|
||||||
(sizeof(SYSTEM_HANDLE_TABLE_ENTRY_INFO) ));
|
(sizeof(SYSTEM_HANDLE_TABLE_ENTRY_INFO)));
|
||||||
|
|
||||||
Shi->NumberOfHandles = hCount;
|
Shi->NumberOfHandles = hCount;
|
||||||
|
|
||||||
|
@ -1081,24 +1072,21 @@ QSI_DEF(SystemHandleInformation)
|
||||||
|
|
||||||
pr = PsGetNextProcess(pr);
|
pr = PsGetNextProcess(pr);
|
||||||
|
|
||||||
if ((pr == syspr) || (pr == NULL))
|
if ((pr == syspr) || (pr == NULL)) break;
|
||||||
break;
|
|
||||||
} while ((pr != syspr) && (pr != NULL));
|
|
||||||
|
|
||||||
if(pr != NULL)
|
|
||||||
{
|
|
||||||
ObDereferenceObject(pr);
|
|
||||||
}
|
}
|
||||||
|
while ((pr != syspr) && (pr != NULL));
|
||||||
|
|
||||||
|
if(pr != NULL) ObDereferenceObject(pr);
|
||||||
|
|
||||||
DPRINT("SystemHandleInformation 4\n");
|
DPRINT("SystemHandleInformation 4\n");
|
||||||
return (STATUS_SUCCESS);
|
return STATUS_SUCCESS;
|
||||||
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
SSI_DEF(SystemHandleInformation)
|
SSI_DEF(SystemHandleInformation)
|
||||||
{
|
{
|
||||||
|
|
||||||
return (STATUS_SUCCESS);
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1107,7 +1095,7 @@ QSI_DEF(SystemObjectInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemObjectInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemObjectInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 18 - Information */
|
/* Class 18 - Information */
|
||||||
|
@ -1116,10 +1104,10 @@ QSI_DEF(SystemPageFileInformation)
|
||||||
UNICODE_STRING FileName; /* FIXME */
|
UNICODE_STRING FileName; /* FIXME */
|
||||||
SYSTEM_PAGEFILE_INFORMATION *Spfi = (SYSTEM_PAGEFILE_INFORMATION *) Buffer;
|
SYSTEM_PAGEFILE_INFORMATION *Spfi = (SYSTEM_PAGEFILE_INFORMATION *) Buffer;
|
||||||
|
|
||||||
if (Size < sizeof (SYSTEM_PAGEFILE_INFORMATION))
|
if (Size < sizeof(SYSTEM_PAGEFILE_INFORMATION))
|
||||||
{
|
{
|
||||||
* ReqSize = sizeof (SYSTEM_PAGEFILE_INFORMATION);
|
* ReqSize = sizeof(SYSTEM_PAGEFILE_INFORMATION);
|
||||||
return (STATUS_INFO_LENGTH_MISMATCH);
|
return STATUS_INFO_LENGTH_MISMATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
RtlInitUnicodeString(&FileName, NULL); /* FIXME */
|
RtlInitUnicodeString(&FileName, NULL); /* FIXME */
|
||||||
|
@ -1131,7 +1119,7 @@ QSI_DEF(SystemPageFileInformation)
|
||||||
Spfi->TotalInUse = MiUsedSwapPages;
|
Spfi->TotalInUse = MiUsedSwapPages;
|
||||||
Spfi->PeakUsage = MiUsedSwapPages; /* FIXME */
|
Spfi->PeakUsage = MiUsedSwapPages; /* FIXME */
|
||||||
Spfi->PageFileName = FileName;
|
Spfi->PageFileName = FileName;
|
||||||
return (STATUS_SUCCESS);
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 19 - Vdm Instemul Information */
|
/* Class 19 - Vdm Instemul Information */
|
||||||
|
@ -1139,7 +1127,7 @@ QSI_DEF(SystemVdmInstemulInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemVdmInstemulInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemVdmInstemulInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 20 - Vdm Bop Information */
|
/* Class 20 - Vdm Bop Information */
|
||||||
|
@ -1147,7 +1135,7 @@ QSI_DEF(SystemVdmBopInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemVdmBopInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemVdmBopInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 21 - File Cache Information */
|
/* Class 21 - File Cache Information */
|
||||||
|
@ -1155,10 +1143,10 @@ QSI_DEF(SystemFileCacheInformation)
|
||||||
{
|
{
|
||||||
SYSTEM_FILECACHE_INFORMATION *Sci = (SYSTEM_FILECACHE_INFORMATION *) Buffer;
|
SYSTEM_FILECACHE_INFORMATION *Sci = (SYSTEM_FILECACHE_INFORMATION *) Buffer;
|
||||||
|
|
||||||
if (Size < sizeof (SYSTEM_FILECACHE_INFORMATION))
|
if (Size < sizeof(SYSTEM_FILECACHE_INFORMATION))
|
||||||
{
|
{
|
||||||
* ReqSize = sizeof (SYSTEM_FILECACHE_INFORMATION);
|
*ReqSize = sizeof(SYSTEM_FILECACHE_INFORMATION);
|
||||||
return (STATUS_INFO_LENGTH_MISMATCH);
|
return STATUS_INFO_LENGTH_MISMATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
RtlZeroMemory(Sci, sizeof(SYSTEM_FILECACHE_INFORMATION));
|
RtlZeroMemory(Sci, sizeof(SYSTEM_FILECACHE_INFORMATION));
|
||||||
|
@ -1176,18 +1164,18 @@ QSI_DEF(SystemFileCacheInformation)
|
||||||
Sci->MinimumWorkingSet = 0; /* FIXME */
|
Sci->MinimumWorkingSet = 0; /* FIXME */
|
||||||
Sci->MaximumWorkingSet = 0; /* FIXME */
|
Sci->MaximumWorkingSet = 0; /* FIXME */
|
||||||
|
|
||||||
return (STATUS_SUCCESS);
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
SSI_DEF(SystemFileCacheInformation)
|
SSI_DEF(SystemFileCacheInformation)
|
||||||
{
|
{
|
||||||
if (Size < sizeof (SYSTEM_FILECACHE_INFORMATION))
|
if (Size < sizeof(SYSTEM_FILECACHE_INFORMATION))
|
||||||
{
|
{
|
||||||
return (STATUS_INFO_LENGTH_MISMATCH);
|
return STATUS_INFO_LENGTH_MISMATCH;
|
||||||
}
|
}
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtSetSystemInformation - SystemFileCacheInformation not implemented\n");
|
DPRINT1("NtSetSystemInformation - SystemFileCacheInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 22 - Pool Tag Information */
|
/* Class 22 - Pool Tag Information */
|
||||||
|
@ -1195,7 +1183,7 @@ QSI_DEF(SystemPoolTagInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemPoolTagInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemPoolTagInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 23 - Interrupt Information for all processors */
|
/* Class 23 - Interrupt Information for all processors */
|
||||||
|
@ -1209,7 +1197,7 @@ QSI_DEF(SystemInterruptInformation)
|
||||||
|
|
||||||
if(Size < KeNumberProcessors * sizeof(SYSTEM_INTERRUPT_INFORMATION))
|
if(Size < KeNumberProcessors * sizeof(SYSTEM_INTERRUPT_INFORMATION))
|
||||||
{
|
{
|
||||||
return (STATUS_INFO_LENGTH_MISMATCH);
|
return STATUS_INFO_LENGTH_MISMATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
ti = KeQueryTimeIncrement();
|
ti = KeQueryTimeIncrement();
|
||||||
|
@ -1239,14 +1227,14 @@ QSI_DEF(SystemDpcBehaviourInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemDpcBehaviourInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemDpcBehaviourInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
SSI_DEF(SystemDpcBehaviourInformation)
|
SSI_DEF(SystemDpcBehaviourInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtSetSystemInformation - SystemDpcBehaviourInformation not implemented\n");
|
DPRINT1("NtSetSystemInformation - SystemDpcBehaviourInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 25 - Full Memory Information */
|
/* Class 25 - Full Memory Information */
|
||||||
|
@ -1256,12 +1244,13 @@ QSI_DEF(SystemFullMemoryInformation)
|
||||||
|
|
||||||
PEPROCESS TheIdleProcess;
|
PEPROCESS TheIdleProcess;
|
||||||
|
|
||||||
* ReqSize = sizeof (ULONG);
|
*ReqSize = sizeof(ULONG);
|
||||||
|
|
||||||
if (sizeof (ULONG) != Size)
|
if (sizeof(ULONG) != Size)
|
||||||
{
|
{
|
||||||
return (STATUS_INFO_LENGTH_MISMATCH);
|
return STATUS_INFO_LENGTH_MISMATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("SystemFullMemoryInformation\n");
|
DPRINT("SystemFullMemoryInformation\n");
|
||||||
|
|
||||||
TheIdleProcess = PsIdleProcess;
|
TheIdleProcess = PsIdleProcess;
|
||||||
|
@ -1278,7 +1267,7 @@ QSI_DEF(SystemFullMemoryInformation)
|
||||||
|
|
||||||
*Spi = MiMemoryConsumers[MC_USER].PagesUsed;
|
*Spi = MiMemoryConsumers[MC_USER].PagesUsed;
|
||||||
|
|
||||||
return (STATUS_SUCCESS);
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 26 - Load Image */
|
/* Class 26 - Load Image */
|
||||||
|
@ -1421,7 +1410,7 @@ QSI_DEF(SystemSummaryMemoryInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemSummaryMemoryInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemSummaryMemoryInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 30 - Next Event Id Information */
|
/* Class 30 - Next Event Id Information */
|
||||||
|
@ -1429,7 +1418,7 @@ QSI_DEF(SystemNextEventIdInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemNextEventIdInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemNextEventIdInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 31 - Event Ids Information */
|
/* Class 31 - Event Ids Information */
|
||||||
|
@ -1437,7 +1426,7 @@ QSI_DEF(SystemEventIdsInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemEventIdsInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemEventIdsInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 32 - Crash Dump Information */
|
/* Class 32 - Crash Dump Information */
|
||||||
|
@ -1445,7 +1434,7 @@ QSI_DEF(SystemCrashDumpInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemCrashDumpInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemCrashDumpInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 33 - Exception Information */
|
/* Class 33 - Exception Information */
|
||||||
|
@ -1453,7 +1442,7 @@ QSI_DEF(SystemExceptionInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemExceptionInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemExceptionInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 34 - Crash Dump State Information */
|
/* Class 34 - Crash Dump State Information */
|
||||||
|
@ -1461,7 +1450,7 @@ QSI_DEF(SystemCrashDumpStateInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemCrashDumpStateInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemCrashDumpStateInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 35 - Kernel Debugger Information */
|
/* Class 35 - Kernel Debugger Information */
|
||||||
|
@ -1486,7 +1475,7 @@ QSI_DEF(SystemContextSwitchInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemContextSwitchInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemContextSwitchInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 37 - Registry Quota Information */
|
/* Class 37 - Registry Quota Information */
|
||||||
|
@ -1512,7 +1501,7 @@ SSI_DEF(SystemRegistryQuotaInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtSetSystemInformation - SystemRegistryQuotaInformation not implemented\n");
|
DPRINT1("NtSetSystemInformation - SystemRegistryQuotaInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 38 - Load And Call Image */
|
/* Class 38 - Load And Call Image */
|
||||||
|
@ -1595,7 +1584,7 @@ SSI_DEF(SystemPrioritySeperation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtSetSystemInformation - SystemPrioritySeperation not implemented\n");
|
DPRINT1("NtSetSystemInformation - SystemPrioritySeperation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 40 - Plug Play Bus Information */
|
/* Class 40 - Plug Play Bus Information */
|
||||||
|
@ -1603,7 +1592,7 @@ QSI_DEF(SystemPlugPlayBusInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemPlugPlayBusInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemPlugPlayBusInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 41 - Dock Information */
|
/* Class 41 - Dock Information */
|
||||||
|
@ -1611,7 +1600,7 @@ QSI_DEF(SystemDockInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemDockInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemDockInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 42 - Power Information */
|
/* Class 42 - Power Information */
|
||||||
|
@ -1619,7 +1608,7 @@ QSI_DEF(SystemPowerInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemPowerInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemPowerInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 43 - Processor Speed Information */
|
/* Class 43 - Processor Speed Information */
|
||||||
|
@ -1627,15 +1616,15 @@ QSI_DEF(SystemProcessorSpeedInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemProcessorSpeedInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemProcessorSpeedInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Class 44 - Current Time Zone Information */
|
/* Class 44 - Current Time Zone Information */
|
||||||
QSI_DEF(SystemCurrentTimeZoneInformation)
|
QSI_DEF(SystemCurrentTimeZoneInformation)
|
||||||
{
|
{
|
||||||
* ReqSize = sizeof (TIME_ZONE_INFORMATION);
|
*ReqSize = sizeof(TIME_ZONE_INFORMATION);
|
||||||
|
|
||||||
if (sizeof (TIME_ZONE_INFORMATION) != Size)
|
if (sizeof(TIME_ZONE_INFORMATION) != Size)
|
||||||
{
|
{
|
||||||
return STATUS_INFO_LENGTH_MISMATCH;
|
return STATUS_INFO_LENGTH_MISMATCH;
|
||||||
}
|
}
|
||||||
|
@ -1652,7 +1641,7 @@ QSI_DEF(SystemCurrentTimeZoneInformation)
|
||||||
SSI_DEF(SystemCurrentTimeZoneInformation)
|
SSI_DEF(SystemCurrentTimeZoneInformation)
|
||||||
{
|
{
|
||||||
/* Check user buffer's size */
|
/* Check user buffer's size */
|
||||||
if (Size < sizeof (TIME_ZONE_INFORMATION))
|
if (Size < sizeof(TIME_ZONE_INFORMATION))
|
||||||
{
|
{
|
||||||
return STATUS_INFO_LENGTH_MISMATCH;
|
return STATUS_INFO_LENGTH_MISMATCH;
|
||||||
}
|
}
|
||||||
|
@ -1666,7 +1655,7 @@ QSI_DEF(SystemLookasideInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemLookasideInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemLookasideInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1675,7 +1664,7 @@ SSI_DEF(SystemSetTimeSlipEvent)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtSetSystemInformation - SystemSetTimSlipEvent not implemented\n");
|
DPRINT1("NtSetSystemInformation - SystemSetTimSlipEvent not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1684,7 +1673,7 @@ SSI_DEF(SystemCreateSession)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtSetSystemInformation - SystemCreateSession not implemented\n");
|
DPRINT1("NtSetSystemInformation - SystemCreateSession not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1693,7 +1682,7 @@ SSI_DEF(SystemDeleteSession)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtSetSystemInformation - SystemDeleteSession not implemented\n");
|
DPRINT1("NtSetSystemInformation - SystemDeleteSession not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1702,7 +1691,7 @@ QSI_DEF(SystemInvalidInfoClass4)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemInvalidInfoClass4 not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemInvalidInfoClass4 not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1711,7 +1700,7 @@ QSI_DEF(SystemRangeStartInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemRangeStartInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemRangeStartInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1720,7 +1709,7 @@ QSI_DEF(SystemVerifierInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemVerifierInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemVerifierInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1728,7 +1717,7 @@ SSI_DEF(SystemVerifierInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtSetSystemInformation - SystemVerifierInformation not implemented\n");
|
DPRINT1("NtSetSystemInformation - SystemVerifierInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1737,7 +1726,7 @@ SSI_DEF(SystemAddVerifier)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtSetSystemInformation - SystemAddVerifier not implemented\n");
|
DPRINT1("NtSetSystemInformation - SystemAddVerifier not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1746,7 +1735,7 @@ QSI_DEF(SystemSessionProcessesInformation)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("NtQuerySystemInformation - SystemSessionProcessInformation not implemented\n");
|
DPRINT1("NtQuerySystemInformation - SystemSessionProcessInformation not implemented\n");
|
||||||
return (STATUS_NOT_IMPLEMENTED);
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1837,7 +1826,7 @@ C_ASSERT(SystemBasicInformation == 0);
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
NTSTATUS NTAPI
|
NTSTATUS NTAPI
|
||||||
NtQuerySystemInformation (IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
|
NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
|
||||||
OUT PVOID SystemInformation,
|
OUT PVOID SystemInformation,
|
||||||
IN ULONG Length,
|
IN ULONG Length,
|
||||||
OUT PULONG UnsafeResultLength)
|
OUT PULONG UnsafeResultLength)
|
||||||
|
@ -1895,17 +1884,15 @@ NtQuerySystemInformation (IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
|
||||||
}
|
}
|
||||||
_SEH2_END;
|
_SEH2_END;
|
||||||
|
|
||||||
return (FStatus);
|
return FStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
NtSetSystemInformation (
|
NtSetSystemInformation (IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
|
||||||
IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
|
|
||||||
IN PVOID SystemInformation,
|
IN PVOID SystemInformation,
|
||||||
IN ULONG SystemInformationLength
|
IN ULONG SystemInformationLength)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
PAGED_CODE();
|
PAGED_CODE();
|
||||||
|
|
||||||
|
@ -1930,32 +1917,28 @@ NtSetSystemInformation (
|
||||||
/*
|
/*
|
||||||
* Check the request is valid.
|
* Check the request is valid.
|
||||||
*/
|
*/
|
||||||
if ( (SystemInformationClass >= MIN_SYSTEM_INFO_CLASS)
|
if ((SystemInformationClass >= MIN_SYSTEM_INFO_CLASS) &&
|
||||||
&& (SystemInformationClass < MAX_SYSTEM_INFO_CLASS)
|
(SystemInformationClass < MAX_SYSTEM_INFO_CLASS))
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (NULL != CallQS [SystemInformationClass].Set)
|
if (NULL != CallQS [SystemInformationClass].Set)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Hand the request to a subhandler.
|
* Hand the request to a subhandler.
|
||||||
*/
|
*/
|
||||||
return CallQS [SystemInformationClass].Set (
|
return CallQS [SystemInformationClass].Set(SystemInformation,
|
||||||
SystemInformation,
|
SystemInformationLength);
|
||||||
SystemInformationLength
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (STATUS_INVALID_INFO_CLASS);
|
|
||||||
|
return STATUS_INVALID_INFO_CLASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
NtFlushInstructionCache (
|
NtFlushInstructionCache(IN HANDLE ProcessHandle,
|
||||||
IN HANDLE ProcessHandle,
|
|
||||||
IN PVOID BaseAddress,
|
IN PVOID BaseAddress,
|
||||||
IN ULONG NumberOfBytesToFlush
|
IN ULONG NumberOfBytesToFlush)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
PAGED_CODE();
|
PAGED_CODE();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue