Module: wine Branch: master Commit: 10509889973a5182e68c7f746b88ccc1efa2e956 URL: http://source.winehq.org/git/wine.git/?a=commit;h=10509889973a5182e68c7f746b...
Author: Sebastian Lackner sebastian@fds-team.de Date: Fri Jul 31 07:48:47 2015 +0200
ntdll: Improve stub for NtQueryInformationJobObject.
---
dlls/ntdll/sync.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c index 04c6de30..b0329ab 100644 --- a/dlls/ntdll/sync.c +++ b/dlls/ntdll/sync.c @@ -636,7 +636,39 @@ NTSTATUS WINAPI NtQueryInformationJobObject( HANDLE handle, JOBOBJECTINFOCLASS c ULONG len, PULONG ret_len ) { FIXME( "stub: %p %u %p %u %p\n", handle, class, info, len, ret_len ); - return STATUS_NOT_IMPLEMENTED; + + if (class >= MaxJobObjectInfoClass) + return STATUS_INVALID_PARAMETER; + + switch (class) + { + case JobObjectExtendedLimitInformation: + { + JOBOBJECT_EXTENDED_LIMIT_INFORMATION *extended_limit; + if (len < sizeof(*extended_limit)) + return STATUS_INFO_LENGTH_MISMATCH; + + extended_limit = (JOBOBJECT_EXTENDED_LIMIT_INFORMATION *)info; + memset(extended_limit, 0, sizeof(*extended_limit)); + if (ret_len) *ret_len = sizeof(*extended_limit); + return STATUS_SUCCESS; + } + + case JobObjectBasicLimitInformation: + { + JOBOBJECT_BASIC_LIMIT_INFORMATION *basic_limit; + if (len < sizeof(*basic_limit)) + return STATUS_INFO_LENGTH_MISMATCH; + + basic_limit = (JOBOBJECT_BASIC_LIMIT_INFORMATION *)info; + memset(basic_limit, 0, sizeof(*basic_limit)); + if (ret_len) *ret_len = sizeof(*basic_limit); + return STATUS_SUCCESS; + } + + default: + return STATUS_NOT_IMPLEMENTED; + } }
/******************************************************************************