- Formatting fix. No code change

svn path=/trunk/; revision=38566
This commit is contained in:
Dmitry Chapyshev 2009-01-04 16:18:29 +00:00
parent 2494ca79f9
commit 6c670fb344

View file

@ -241,13 +241,12 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
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;
}
} }
/* /*
@ -275,8 +271,7 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
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
@ -364,7 +356,8 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
} }
NTSTATUS NTAPI NTSTATUS
NTAPI
NtSetSystemEnvironmentValue(IN PUNICODE_STRING VariableName, NtSetSystemEnvironmentValue(IN PUNICODE_STRING VariableName,
IN PUNICODE_STRING Value) IN PUNICODE_STRING Value)
{ {
@ -486,13 +479,13 @@ QSI_DEF(SystemBasicInformation)
= (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 */
@ -545,12 +539,11 @@ 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;
@ -566,8 +559,8 @@ QSI_DEF(SystemPerformanceInformation)
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 +
@ -575,12 +568,11 @@ QSI_DEF(SystemPerformanceInformation)
MiMemoryConsumers[MC_USER].PagesUsed + MiMemoryConsumers[MC_USER].PagesUsed +
MiUsedSwapPages; MiUsedSwapPages;
/* /*
Add up the full system total + pagefile. * Add up the full system total + pagefile.
All this make Taskmgr happy but not sure it is the right numbers. * All this make Taskmgr happy but not sure it is the right numbers.
This too, fixes some of GlobalMemoryStatusEx numbers. * This too, fixes some of GlobalMemoryStatusEx numbers.
*/ */
Spi->CommitLimit = MmStats.NrTotalPages + MiFreeSwapPages + Spi->CommitLimit = MmStats.NrTotalPages + MiFreeSwapPages + MiUsedSwapPages;
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 */
@ -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 */
@ -876,12 +868,11 @@ QSI_DEF(SystemDeviceInformation)
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();
@ -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 */
@ -943,17 +934,17 @@ QSI_DEF(SystemFlagsInformation)
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;
} }
@ -1023,7 +1014,7 @@ QSI_DEF(SystemHandleInformation)
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)
{ {
@ -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 */
@ -1119,7 +1107,7 @@ QSI_DEF(SystemPageFileInformation)
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 */
@ -1158,7 +1146,7 @@ QSI_DEF(SystemFileCacheInformation)
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 */
@ -1260,8 +1248,9 @@ QSI_DEF(SystemFullMemoryInformation)
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,7 +1616,7 @@ 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 */
@ -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;
} }
@ -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();