winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2015
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
749 discussions
Start a n
N
ew thread
Dmitry Timoshkov : ntdll: Implement RtlValidRelativeSecurityDescriptor.
by Alexandre Julliard
12 Oct '15
12 Oct '15
Module: wine Branch: master Commit: af6610844669df27b10ef2611a1ef712f349ac7e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=af6610844669df27b10ef2611…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Oct 12 11:21:30 2015 +0800 ntdll: Implement RtlValidRelativeSecurityDescriptor. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/ntdll.spec | 2 +- dlls/ntdll/sec.c | 10 ++++++++++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- include/winternl.h | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 40d3df5..38422ae 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -939,7 +939,7 @@ @ stub RtlUsageHeap @ cdecl -i386 -norelay RtlUshortByteSwap() NTDLL_RtlUshortByteSwap @ stdcall RtlValidAcl(ptr) -# @ stub RtlValidRelativeSecurityDescriptor +@ stdcall RtlValidRelativeSecurityDescriptor(ptr long long) @ stdcall RtlValidSecurityDescriptor(ptr) @ stdcall RtlValidSid(ptr) @ stdcall RtlValidateHeap(long long ptr) diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c index 360a579..125c86e 100644 --- a/dlls/ntdll/sec.c +++ b/dlls/ntdll/sec.c @@ -558,6 +558,16 @@ NTSTATUS WINAPI RtlValidSecurityDescriptor( } /************************************************************************** + * RtlValidRelativeSecurityDescriptor [NTDLL.@] + */ +BOOLEAN WINAPI RtlValidRelativeSecurityDescriptor(PSECURITY_DESCRIPTOR descriptor, + ULONG length, SECURITY_INFORMATION info) +{ + FIXME("%p,%u,%d: semi-stub\n", descriptor, length, info); + return RtlValidSecurityDescriptor(descriptor) == STATUS_SUCCESS; +} + +/************************************************************************** * RtlLengthSecurityDescriptor [NTDLL.@] */ ULONG WINAPI RtlLengthSecurityDescriptor( diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index 58ad879..1957a9a 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -1191,7 +1191,7 @@ @ stdcall RtlUpcaseUnicodeToOemN(ptr long ptr ptr long) ntdll.RtlUpcaseUnicodeToOemN @ stdcall RtlUpperChar(long) ntdll.RtlUpperChar @ stdcall RtlUpperString(ptr ptr) ntdll.RtlUpperString -@ stub RtlValidRelativeSecurityDescriptor +@ stdcall RtlValidRelativeSecurityDescriptor(ptr long long) ntdll.RtlValidRelativeSecurityDescriptor @ stdcall RtlValidSecurityDescriptor(ptr) ntdll.RtlValidSecurityDescriptor @ stdcall RtlValidSid(ptr) ntdll.RtlValidSid @ stdcall RtlVerifyVersionInfo(ptr long int64) ntdll.RtlVerifyVersionInfo diff --git a/include/winternl.h b/include/winternl.h index 61b144a..5420391 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -2603,6 +2603,7 @@ NTSYSAPI NTSTATUS WINAPI RtlUpdateTimer(HANDLE, HANDLE, DWORD, DWORD); NTSYSAPI CHAR WINAPI RtlUpperChar(CHAR); NTSYSAPI void WINAPI RtlUpperString(STRING *,const STRING *); NTSYSAPI NTSTATUS WINAPI RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR); +NTSYSAPI BOOLEAN WINAPI RtlValidRelativeSecurityDescriptor(PSECURITY_DESCRIPTOR,ULONG,SECURITY_INFORMATION); NTSYSAPI BOOLEAN WINAPI RtlValidAcl(PACL); NTSYSAPI BOOLEAN WINAPI RtlValidSid(PSID); NTSYSAPI BOOLEAN WINAPI RtlValidateHeap(HANDLE,ULONG,LPCVOID);
1
0
0
0
Austin English : fltmgr.sys: Add a stub driver.
by Alexandre Julliard
12 Oct '15
12 Oct '15
Module: wine Branch: master Commit: fba70e71d6b798991d07661c284f95608a5e448f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fba70e71d6b798991d07661c2…
Author: Austin English <austinenglish(a)gmail.com> Date: Sun Oct 11 12:05:07 2015 -0500 fltmgr.sys: Add a stub driver. Signed-off-by: Austin English <austinenglish(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 2 + configure.ac | 1 + dlls/fltmgr.sys/Makefile.in | 5 ++ dlls/fltmgr.sys/fltmgr.sys.spec | 163 ++++++++++++++++++++++++++++++++++++++++ dlls/fltmgr.sys/main.c | 38 ++++++++++ loader/wine.inf.in | 2 + 6 files changed, 211 insertions(+) diff --git a/configure b/configure index 872db31..80cc812 100755 --- a/configure +++ b/configure @@ -1085,6 +1085,7 @@ enable_explorerframe enable_ext_ms_win_gdi_devcaps_l1_1_0 enable_faultrep enable_fltlib +enable_fltmgr_sys enable_fntcache enable_fontsub enable_fusion @@ -17490,6 +17491,7 @@ wine_fn_config_dll ext-ms-win-gdi-devcaps-l1-1-0 enable_ext_ms_win_gdi_devcaps_l wine_fn_config_dll faultrep enable_faultrep implib wine_fn_config_test dlls/faultrep/tests faultrep_test wine_fn_config_dll fltlib enable_fltlib +wine_fn_config_dll fltmgr.sys enable_fltmgr_sys wine_fn_config_dll fntcache enable_fntcache wine_fn_config_dll fontsub enable_fontsub wine_fn_config_dll fusion enable_fusion diff --git a/configure.ac b/configure.ac index e22b0ef..de8cde5 100644 --- a/configure.ac +++ b/configure.ac @@ -3002,6 +3002,7 @@ WINE_CONFIG_DLL(ext-ms-win-gdi-devcaps-l1-1-0) WINE_CONFIG_DLL(faultrep,,[implib]) WINE_CONFIG_TEST(dlls/faultrep/tests) WINE_CONFIG_DLL(fltlib) +WINE_CONFIG_DLL(fltmgr.sys) WINE_CONFIG_DLL(fntcache) WINE_CONFIG_DLL(fontsub) WINE_CONFIG_DLL(fusion) diff --git a/dlls/fltmgr.sys/Makefile.in b/dlls/fltmgr.sys/Makefile.in new file mode 100644 index 0000000..3fefde7 --- /dev/null +++ b/dlls/fltmgr.sys/Makefile.in @@ -0,0 +1,5 @@ +MODULE = fltmgr.sys +EXTRADLLFLAGS = -Wb,--subsystem,native + +C_SRCS = \ + main.c diff --git a/dlls/fltmgr.sys/fltmgr.sys.spec b/dlls/fltmgr.sys/fltmgr.sys.spec new file mode 100644 index 0000000..5310269 --- /dev/null +++ b/dlls/fltmgr.sys/fltmgr.sys.spec @@ -0,0 +1,163 @@ +@ stub FltAcquirePushLockExclusive +@ stub FltAcquirePushLockShared +@ stub FltAcquireResourceExclusive +@ stub FltAcquireResourceShared +@ stub FltAllocateCallbackData +@ stub FltAllocateContext +@ stub FltAllocateDeferredIoWorkItem +@ stub FltAllocateFileLock +@ stub FltAllocateGenericWorkItem +@ stub FltAllocatePoolAlignedWithTag +@ stub FltAttachVolume +@ stub FltAttachVolumeAtAltitude +@ stub FltBuildDefaultSecurityDescriptor +@ stub FltCancelFileOpen +@ stub FltCancelIo +@ stub FltCbdqDisable +@ stub FltCbdqEnable +@ stub FltCbdqInitialize +@ stub FltCbdqInsertIo +@ stub FltCbdqRemoveIo +@ stub FltCbdqRemoveNextIo +@ stub FltCheckAndGrowNameControl +@ stub FltCheckLockForReadAccess +@ stub FltCheckLockForWriteAccess +@ stub FltCheckOplock +@ stub FltClearCallbackDataDirty +@ stub FltClearCancelCompletion +@ stub FltClose +@ stub FltCloseClientPort +@ stub FltCloseCommunicationPort +@ stub FltCompareInstanceAltitudes +@ stub FltCompletePendedPostOperation +@ stub FltCompletePendedPreOperation +@ stub FltCreateCommunicationPort +@ stub FltCreateFile +@ stub FltCreateFileEx +@ stub FltCreateSystemVolumeInformationFolder +@ stub FltCurrentBatchOplock +@ stub FltDecodeParameters +@ stub FltDeleteContext +@ stub FltDeleteFileContext +@ stub FltDeleteInstanceContext +@ stub FltDeletePushLock +@ stub FltDeleteStreamContext +@ stub FltDeleteStreamHandleContext +@ stub FltDeleteVolumeContext +@ stub FltDetachVolume +@ stub FltDeviceIoControlFile +@ stub FltDoCompletionProcessingWhenSafe +@ stub FltEnumerateFilterInformation +@ stub FltEnumerateFilters +@ stub FltEnumerateInstanceInformationByFilter +@ stub FltEnumerateInstanceInformationByVolume +@ stub FltEnumerateInstances +@ stub FltEnumerateVolumeInformation +@ stub FltEnumerateVolumes +@ stub FltFlushBuffers +@ stub FltFreeCallbackData +@ stub FltFreeDeferredIoWorkItem +@ stub FltFreeFileLock +@ stub FltFreeGenericWorkItem +@ stub FltFreePoolAlignedWithTag +@ stub FltFreeSecurityDescriptor +@ stub FltFsControlFile +@ stub FltGetBottomInstance +@ stub FltGetContexts +@ stub FltGetDestinationFileNameInformation +@ stub FltGetDeviceObject +@ stub FltGetDiskDeviceObject +@ stub FltGetFileContext +@ stub FltGetFileNameInformation +@ stub FltGetFileNameInformationUnsafe +@ stub FltGetFilterFromInstance +@ stub FltGetFilterFromName +@ stub FltGetFilterInformation +@ stub FltGetInstanceContext +@ stub FltGetInstanceInformation +@ stub FltGetIrpName +@ stub FltGetLowerInstance +@ stub FltGetRequestorProcess +@ stub FltGetRequestorProcessId +@ stub FltGetRoutineAddress +@ stub FltGetStreamContext +@ stub FltGetStreamHandleContext +@ stub FltGetSwappedBufferMdlAddress +@ stub FltGetTopInstance +@ stub FltGetTunneledName +@ stub FltGetUpperInstance +@ stub FltGetVolumeContext +@ stub FltGetVolumeFromDeviceObject +@ stub FltGetVolumeFromFileObject +@ stub FltGetVolumeFromInstance +@ stub FltGetVolumeFromName +@ stub FltGetVolumeGuidName +@ stub FltGetVolumeInstanceFromName +@ stub FltGetVolumeName +@ stub FltGetVolumeProperties +@ stub FltInitializeFileLock +@ stub FltInitializeOplock +@ stub FltInitializePushLock +@ stub FltIs32bitProcess +@ stub FltIsCallbackDataDirty +@ stub FltIsDirectory +@ stub FltIsIoCanceled +@ stub FltIsOperationSynchronous +@ stub FltIsVolumeWritable +@ stub FltLoadFilter +@ stub FltLockUserBuffer +@ stub FltNotifyFilterChangeDirectory +@ stub FltObjectDereference +@ stub FltObjectReference +@ stub FltOpenVolume +@ stub FltOplockFsctrl +@ stub FltOplockIsFastIoPossible +@ stub FltParseFileName +@ stub FltParseFileNameInformation +@ stub FltPerformAsynchronousIo +@ stub FltPerformSynchronousIo +@ stub FltProcessFileLock +@ stub FltPurgeFileNameInformationCache +@ stub FltQueryEaFile +@ stub FltQueryInformationFile +@ stub FltQuerySecurityObject +@ stub FltQueryVolumeInformation +@ stub FltQueryVolumeInformationFile +@ stub FltQueueDeferredIoWorkItem +@ stub FltQueueGenericWorkItem +@ stub FltReadFile +@ stub FltReferenceContext +@ stub FltReferenceFileNameInformation +@ stub FltRegisterFilter +@ stub FltReissueSynchronousIo +@ stub FltReleaseContext +@ stub FltReleaseContexts +@ stub FltReleaseFileNameInformation +@ stub FltReleasePushLock +@ stub FltReleaseResource +@ stub FltRequestOperationStatusCallback +@ stub FltRetainSwappedBufferMdlAddress +@ stub FltReuseCallbackData +@ stub FltSendMessage +@ stub FltSetCallbackDataDirty +@ stub FltSetCancelCompletion +@ stub FltSetEaFile +@ stub FltSetFileContext +@ stub FltSetInformationFile +@ stub FltSetInstanceContext +@ stub FltSetSecurityObject +@ stub FltSetStreamContext +@ stub FltSetStreamHandleContext +@ stub FltSetVolumeContext +@ stub FltSetVolumeInformation +@ stub FltStartFiltering +@ stub FltSupportsFileContexts +@ stub FltSupportsStreamContexts +@ stub FltSupportsStreamHandleContexts +@ stub FltTagFile +@ stub FltUninitializeFileLock +@ stub FltUninitializeOplock +@ stub FltUnloadFilter +@ stub FltUnregisterFilter +@ stub FltUntagFile +@ stub FltWriteFile diff --git a/dlls/fltmgr.sys/main.c b/dlls/fltmgr.sys/main.c new file mode 100644 index 0000000..7341ef2 --- /dev/null +++ b/dlls/fltmgr.sys/main.c @@ -0,0 +1,38 @@ +/* + * fltmgr.sys + * + * Copyright 2015 Austin English + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdarg.h> + +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "windef.h" +#include "winbase.h" +#include "winternl.h" +#include "ddk/wdm.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(fltmgr); + +NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path ) +{ + TRACE( "(%p, %s)\n", driver, debugstr_w(path->Buffer) ); + + return STATUS_SUCCESS; +} diff --git a/loader/wine.inf.in b/loader/wine.inf.in index f30942a..3e512d6 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -2499,6 +2499,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 10,syswow64,stdole2.tlb 11,,iexplore.exe 11,,winetest.exe,- +12,,fltmgr.sys,- 12,,mountmgr.sys,- 12,,ndis.sys,- ; skip .NET fake dlls in Wine Mono package @@ -2537,6 +2538,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 11,,iexplore.exe 11,,notepad.exe 11,,winetest.exe,- +12,,fltmgr.sys 12,,mountmgr.sys 12,,ndis.sys ; skip .NET fake dlls in Wine Mono package
1
0
0
0
Austin English : kernel32: Add a stub for GetCurrentProcessorNumberEx.
by Alexandre Julliard
12 Oct '15
12 Oct '15
Module: wine Branch: master Commit: 132ff59b3ecb80d9e1c18616861ec4cc098bae53 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=132ff59b3ecb80d9e1c186168…
Author: Austin English <austinenglish(a)gmail.com> Date: Sun Oct 11 11:50:53 2015 -0500 kernel32: Add a stub for GetCurrentProcessorNumberEx. Signed-off-by: Austin English <austinenglish(a)gmail.com> Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- .../api-ms-win-core-processthreads-l1-1-1.spec | 2 +- .../api-ms-win-core-processthreads-l1-1-2.spec | 2 +- dlls/kernel32/kernel32.spec | 2 +- dlls/ntdll/ntdll.spec | 1 + dlls/ntdll/rtl.c | 11 +++++++++++ include/winternl.h | 1 + 6 files changed, 16 insertions(+), 3 deletions(-) diff --git a/dlls/api-ms-win-core-processthreads-l1-1-1/api-ms-win-core-processthreads-l1-1-1.spec b/dlls/api-ms-win-core-processthreads-l1-1-1/api-ms-win-core-processthreads-l1-1-1.spec index 9fb1941..84f43d8 100644 --- a/dlls/api-ms-win-core-processthreads-l1-1-1/api-ms-win-core-processthreads-l1-1-1.spec +++ b/dlls/api-ms-win-core-processthreads-l1-1-1/api-ms-win-core-processthreads-l1-1-1.spec @@ -12,7 +12,7 @@ @ stdcall -norelay GetCurrentProcess() kernel32.GetCurrentProcess @ stdcall -norelay GetCurrentProcessId() kernel32.GetCurrentProcessId @ stdcall GetCurrentProcessorNumber() kernel32.GetCurrentProcessorNumber -@ stub GetCurrentProcessorNumberEx +@ stdcall GetCurrentProcessorNumberEx(ptr) kernel32.GetCurrentProcessorNumberEx @ stdcall -norelay GetCurrentThread() kernel32.GetCurrentThread @ stdcall -norelay GetCurrentThreadId() kernel32.GetCurrentThreadId @ stub GetCurrentThreadStackLimits diff --git a/dlls/api-ms-win-core-processthreads-l1-1-2/api-ms-win-core-processthreads-l1-1-2.spec b/dlls/api-ms-win-core-processthreads-l1-1-2/api-ms-win-core-processthreads-l1-1-2.spec index 830578f..6430c63 100644 --- a/dlls/api-ms-win-core-processthreads-l1-1-2/api-ms-win-core-processthreads-l1-1-2.spec +++ b/dlls/api-ms-win-core-processthreads-l1-1-2/api-ms-win-core-processthreads-l1-1-2.spec @@ -12,7 +12,7 @@ @ stdcall -norelay GetCurrentProcess() kernel32.GetCurrentProcess @ stdcall -norelay GetCurrentProcessId() kernel32.GetCurrentProcessId @ stdcall GetCurrentProcessorNumber() kernel32.GetCurrentProcessorNumber -@ stub GetCurrentProcessorNumberEx +@ stdcall GetCurrentProcessorNumberEx(ptr) kernel32.GetCurrentProcessorNumberEx @ stdcall -norelay GetCurrentThread() kernel32.GetCurrentThread @ stdcall -norelay GetCurrentThreadId() kernel32.GetCurrentThreadId @ stub GetCurrentThreadStackLimits diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index bda7c9d..e0cb154 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -632,7 +632,7 @@ @ stdcall -norelay GetCurrentProcess() @ stdcall -norelay GetCurrentProcessId() @ stdcall GetCurrentProcessorNumber() ntdll.NtGetCurrentProcessorNumber -# @ stub GetCurrentProcessorNumberEx +@ stdcall GetCurrentProcessorNumberEx(ptr) ntdll.RtlGetCurrentProcessorNumberEx @ stdcall -norelay GetCurrentThread() @ stdcall -norelay GetCurrentThreadId() # @ stub -arch=x86_64 GetCurrentUmsThread diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 7f07b14..40d3df5 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -627,6 +627,7 @@ @ stdcall RtlGetControlSecurityDescriptor(ptr ptr ptr) @ stdcall RtlGetCurrentDirectory_U(long ptr) @ stdcall RtlGetCurrentPeb() +@ stdcall RtlGetCurrentProcessorNumberEx(ptr) @ stdcall RtlGetCurrentTransaction() @ stdcall RtlGetDaclSecurityDescriptor(ptr ptr ptr ptr) @ stub RtlGetElementGenericTable diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c index d20a098..8eb3e9f 100644 --- a/dlls/ntdll/rtl.c +++ b/dlls/ntdll/rtl.c @@ -1584,3 +1584,14 @@ BOOL WINAPI RtlSetCurrentTransaction(HANDLE new_transaction) FIXME("(%p) :stub\n", new_transaction); return FALSE; } + +/********************************************************************** + * RtlGetCurrentProcessorNumberEx [NTDLL.@] + */ +void WINAPI RtlGetCurrentProcessorNumberEx(PROCESSOR_NUMBER *processor) +{ + FIXME("(%p) :semi-stub\n", processor); + processor->Group = 0; + processor->Number = NtGetCurrentProcessorNumber(); + processor->Reserved = 0; +} diff --git a/include/winternl.h b/include/winternl.h index e76114e..61b144a 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -2143,6 +2143,7 @@ NTSYSAPI NTSTATUS WINAPI NtFlushWriteBuffer(VOID); NTSYSAPI NTSTATUS WINAPI NtFreeVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG); NTSYSAPI NTSTATUS WINAPI NtFsControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG); NTSYSAPI NTSTATUS WINAPI NtGetContextThread(HANDLE,CONTEXT*); +NTSYSAPI ULONG WINAPI NtGetCurrentProcessorNumber(void); NTSYSAPI NTSTATUS WINAPI NtGetPlugPlayEvent(ULONG,ULONG,PVOID,ULONG); NTSYSAPI ULONG WINAPI NtGetTickCount(VOID); NTSYSAPI NTSTATUS WINAPI NtGetWriteWatch(HANDLE,ULONG,PVOID,SIZE_T,PVOID*,ULONG_PTR*,ULONG*);
1
0
0
0
Bruno Jesus : ws2_32/tests: Add WSAEnumNameSpaceProviders[A|W] tests.
by Alexandre Julliard
12 Oct '15
12 Oct '15
Module: wine Branch: master Commit: ad2405daa408e50a2d23e9af58503f40d91fbb94 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ad2405daa408e50a2d23e9af5…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Sun Oct 11 19:07:17 2015 +0800 ws2_32/tests: Add WSAEnumNameSpaceProviders[A|W] tests. Signed-off-by: Bruno Jesus <00cpxxx(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ws2_32/tests/sock.c | 160 +++++++++++++++++++++++++++++++++++++++++++++++ include/winsock2.h | 27 ++++++++ 2 files changed, 187 insertions(+) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index a8ee3ce..7fbd67d 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -72,6 +72,8 @@ static int (WINAPI *pInetPtonW)(INT,LPWSTR,LPVOID); static int (WINAPI *pWSALookupServiceBeginW)(LPWSAQUERYSETW,DWORD,LPHANDLE); static int (WINAPI *pWSALookupServiceEnd)(HANDLE); static int (WINAPI *pWSALookupServiceNextW)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETW); +static int (WINAPI *pWSAEnumNameSpaceProvidersA)(LPDWORD,LPWSANAMESPACE_INFOA); +static int (WINAPI *pWSAEnumNameSpaceProvidersW)(LPDWORD,LPWSANAMESPACE_INFOW); /**************** Structs and typedefs ***************/ @@ -1165,6 +1167,8 @@ static void Init (void) pWSALookupServiceBeginW = (void *)GetProcAddress(hws2_32, "WSALookupServiceBeginW"); pWSALookupServiceEnd = (void *)GetProcAddress(hws2_32, "WSALookupServiceEnd"); pWSALookupServiceNextW = (void *)GetProcAddress(hws2_32, "WSALookupServiceNextW"); + pWSAEnumNameSpaceProvidersA = (void *)GetProcAddress(hws2_32, "WSAEnumNameSpaceProvidersA"); + pWSAEnumNameSpaceProvidersW = (void *)GetProcAddress(hws2_32, "WSAEnumNameSpaceProvidersW"); ok ( WSAStartup ( ver, &data ) == 0, "WSAStartup failed\n" ); tls = TlsAlloc(); @@ -8834,6 +8838,160 @@ todo_wine ok(!ret, "WSALookupServiceEnd failed unexpectedly\n"); } +static void test_WSAEnumNameSpaceProvidersA(void) +{ + LPWSANAMESPACE_INFOA name = NULL; + DWORD ret, error, blen = 0, i; + if (!pWSAEnumNameSpaceProvidersA) + { + win_skip("WSAEnumNameSpaceProvidersA not found\n"); + return; + } + + SetLastError(0xdeadbeef); + ret = pWSAEnumNameSpaceProvidersA(&blen, name); + error = WSAGetLastError(); +todo_wine + ok(ret == SOCKET_ERROR, "Expected failure, got %u\n", ret); +todo_wine + ok(error == WSAEFAULT, "Expected 10014, got %u\n", error); + + /* Invalid parameter tests */ + SetLastError(0xdeadbeef); + ret = pWSAEnumNameSpaceProvidersA(NULL, name); + error = WSAGetLastError(); +todo_wine + ok(ret == SOCKET_ERROR, "Expected failure, got %u\n", ret); +todo_wine + ok(error == WSAEFAULT, "Expected 10014, got %u\n", error); + + SetLastError(0xdeadbeef); + ret = pWSAEnumNameSpaceProvidersA(NULL, NULL); + error = WSAGetLastError(); +todo_wine + ok(ret == SOCKET_ERROR, "Expected failure, got %u\n", ret); +todo_wine + ok(error == WSAEFAULT, "Expected 10014, got %u\n", error); + + SetLastError(0xdeadbeef); + ret = pWSAEnumNameSpaceProvidersA(&blen, NULL); + error = WSAGetLastError(); +todo_wine + ok(ret == SOCKET_ERROR, "Expected failure, got %u\n", ret); +todo_wine + ok(error == WSAEFAULT, "Expected 10014, got %u\n", error); + + name = HeapAlloc(GetProcessHeap(), 0, blen); + if (!name) + { + skip("Failed to alloc memory\n"); + return; + } + + ret = pWSAEnumNameSpaceProvidersA(&blen, name); +todo_wine + ok(ret > 0, "Expected more than zero name space providers\n"); + + for (i = 0;i < ret; i++) + { + trace("Name space Identifier (%p): %s\n", name[i].lpszIdentifier, + name[i].lpszIdentifier); + switch (name[i].dwNameSpace) + { + case NS_DNS: + trace("\tName space ID: NS_DNS (%u)\n", name[i].dwNameSpace); + break; + case NS_NLA: + trace("\tName space ID: NS_NLA (%u)\n", name[i].dwNameSpace); + break; + default: + trace("\tName space ID: Unknown (%u)\n", name[i].dwNameSpace); + break; + } + trace("\tActive: %d\n", name[i].fActive); + trace("\tVersion: %d\n", name[i].dwVersion); + } + + HeapFree(GetProcessHeap(), 0, name); +} + +static void test_WSAEnumNameSpaceProvidersW(void) +{ + LPWSANAMESPACE_INFOW name = NULL; + DWORD ret, error, blen = 0, i; + if (!pWSAEnumNameSpaceProvidersW) + { + win_skip("WSAEnumNameSpaceProvidersW not found\n"); + return; + } + + SetLastError(0xdeadbeef); + ret = pWSAEnumNameSpaceProvidersW(&blen, name); + error = WSAGetLastError(); +todo_wine + ok(ret == SOCKET_ERROR, "Expected failure, got %u\n", ret); +todo_wine + ok(error == WSAEFAULT, "Expected 10014, got %u\n", error); + + /* Invalid parameter tests */ + SetLastError(0xdeadbeef); + ret = pWSAEnumNameSpaceProvidersW(NULL, name); + error = WSAGetLastError(); +todo_wine + ok(ret == SOCKET_ERROR, "Expected failure, got %u\n", ret); +todo_wine + ok(error == WSAEFAULT, "Expected 10014, got %u\n", error); + + SetLastError(0xdeadbeef); + ret = pWSAEnumNameSpaceProvidersW(NULL, NULL); + error = WSAGetLastError(); +todo_wine + ok(ret == SOCKET_ERROR, "Expected failure, got %u\n", ret); +todo_wine + ok(error == WSAEFAULT, "Expected 10014, got %u\n", error); + + SetLastError(0xdeadbeef); + ret = pWSAEnumNameSpaceProvidersW(&blen, NULL); + error = WSAGetLastError(); +todo_wine + ok(ret == SOCKET_ERROR, "Expected failure, got %u\n", ret); +todo_wine + ok(error == WSAEFAULT, "Expected 10014, got %u\n", error); + + name = HeapAlloc(GetProcessHeap(), 0, blen); + if (!name) + { + skip("Failed to alloc memory\n"); + return; + } + + ret = pWSAEnumNameSpaceProvidersW(&blen, name); +todo_wine + ok(ret > 0, "Expected more than zero name space providers\n"); + + for (i = 0;i < ret; i++) + { + trace("Name space Identifier (%p): %s\n", name[i].lpszIdentifier, + wine_dbgstr_w(name[i].lpszIdentifier)); + switch (name[i].dwNameSpace) + { + case NS_DNS: + trace("\tName space ID: NS_DNS (%u)\n", name[i].dwNameSpace); + break; + case NS_NLA: + trace("\tName space ID: NS_NLA (%u)\n", name[i].dwNameSpace); + break; + default: + trace("\tName space ID: Unknown (%u)\n", name[i].dwNameSpace); + break; + } + trace("\tActive: %d\n", name[i].fActive); + trace("\tVersion: %d\n", name[i].dwVersion); + } + + HeapFree(GetProcessHeap(), 0, name); +} + /**************** Main program ***************/ START_TEST( sock ) @@ -8905,6 +9063,8 @@ START_TEST( sock ) test_sioAddressListChange(); test_WSALookupService(); + test_WSAEnumNameSpaceProvidersA(); + test_WSAEnumNameSpaceProvidersW(); test_WSAAsyncGetServByPort(); test_WSAAsyncGetServByName(); diff --git a/include/winsock2.h b/include/winsock2.h index fa3d26b..d871a23 100644 --- a/include/winsock2.h +++ b/include/winsock2.h @@ -211,6 +211,33 @@ extern "C" { #define LUP_RETURN_ALL (LUP_RETURN_ADDR|LUP_RETURN_BLOB|LUP_RETURN_ALIASES|LUP_RETURN_QUERY_STRING \ |LUP_RETURN_NAME|LUP_RETURN_TYPE|LUP_RETURN_VERSION|LUP_RETURN_COMMENT) +/* Constants for dwNameSpace from struct WSANAMESPACE_INFO */ +#define NS_ALL 0 +#define NS_SAP 1 +#define NS_NDS 2 +#define NS_PEER_BROWSE 3 +#define NS_SLP 5 +#define NS_DHCP 6 +#define NS_TCPIP_LOCAL 10 +#define NS_TCPIP_HOSTS 11 +#define NS_DNS 12 +#define NS_NETBT 13 +#define NS_WINS 14 +#define NS_NLA 15 +#define NS_BTH 16 +#define NS_NBP 20 +#define NS_MS 30 +#define NS_STDA 31 +#define NS_NTDS 32 +#define NS_EMAIL 37 +#define NS_PNRPNAME 38 +#define NS_PNRPCLOUD 39 +#define NS_X500 40 +#define NS_NIS 41 +#define NS_NISPLUS 42 +#define NS_WRQ 50 +#define NS_NETDES 60 + #ifndef GUID_DEFINED #include <guiddef.h> #endif
1
0
0
0
Sebastian Lackner : vcomp: Use RtlIsCriticalSectionLockedByThread to check lock owner.
by Alexandre Julliard
12 Oct '15
12 Oct '15
Module: wine Branch: master Commit: 2964c2b34bfcedad045a7800b7d15aef6433fe21 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2964c2b34bfcedad045a7800b…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Sat Oct 10 05:40:56 2015 +0200 vcomp: Use RtlIsCriticalSectionLockedByThread to check lock owner. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vcomp/main.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c index 5aa0343..12fd2a5 100644 --- a/dlls/vcomp/main.c +++ b/dlls/vcomp/main.c @@ -29,6 +29,7 @@ #include "windef.h" #include "winbase.h" +#include "winternl.h" #include "wine/debug.h" #include "wine/list.h" @@ -1051,12 +1052,6 @@ static void destroy_critsect(CRITICAL_SECTION *critsect) HeapFree(GetProcessHeap(), 0, critsect); } -static BOOL critsect_is_locked(CRITICAL_SECTION *critsect) -{ - return critsect->OwningThread == ULongToHandle(GetCurrentThreadId()) && - critsect->RecursionCount; -} - void CDECL omp_init_lock(omp_lock_t *lock) { TRACE("(%p)\n", lock); @@ -1073,7 +1068,7 @@ void CDECL omp_set_lock(omp_lock_t *lock) { TRACE("(%p)\n", lock); - if (critsect_is_locked(*lock)) + if (RtlIsCriticalSectionLockedByThread(*lock)) { ERR("omp_set_lock called while holding lock %p\n", *lock); ExitProcess(1); @@ -1092,7 +1087,7 @@ int CDECL omp_test_lock(omp_lock_t *lock) { TRACE("(%p)\n", lock); - if (critsect_is_locked(*lock)) + if (RtlIsCriticalSectionLockedByThread(*lock)) return 0; return TryEnterCriticalSection(*lock);
1
0
0
0
Sebastian Lackner : user32: Use RtlIsCriticalSectionLockedByThread to check lock owner.
by Alexandre Julliard
12 Oct '15
12 Oct '15
Module: wine Branch: master Commit: 240cf962357c9844ef55e5a537e711c831f0ccfc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=240cf962357c9844ef55e5a53…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Sat Oct 10 05:40:36 2015 +0200 user32: Use RtlIsCriticalSectionLockedByThread to check lock owner. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/user_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c index 718abe0..45aea81 100644 --- a/dlls/user32/user_main.c +++ b/dlls/user32/user_main.c @@ -81,7 +81,7 @@ void USER_Unlock(void) */ void USER_CheckNotLock(void) { - if (user_section.OwningThread == ULongToHandle(GetCurrentThreadId()) && user_section.RecursionCount) + if (RtlIsCriticalSectionLockedByThread(&user_section)) { ERR( "BUG: holding USER lock\n" ); DebugBreak();
1
0
0
0
Sebastian Lackner : gdi32: Use RtlIsCriticalSectionLockedByThread to check lock owner.
by Alexandre Julliard
12 Oct '15
12 Oct '15
Module: wine Branch: master Commit: 04bd68409afc4751dd9956247327c20062420fb4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=04bd68409afc4751dd9956247…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Sat Oct 10 05:40:07 2015 +0200 gdi32: Use RtlIsCriticalSectionLockedByThread to check lock owner. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/gdiobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/gdi32/gdiobj.c b/dlls/gdi32/gdiobj.c index a255a4c..e861f24 100644 --- a/dlls/gdi32/gdiobj.c +++ b/dlls/gdi32/gdiobj.c @@ -867,7 +867,7 @@ void GDI_ReleaseObj( HGDIOBJ handle ) */ void GDI_CheckNotLock(void) { - if (gdi_section.OwningThread == ULongToHandle(GetCurrentThreadId()) && gdi_section.RecursionCount) + if (RtlIsCriticalSectionLockedByThread(&gdi_section)) { ERR( "BUG: holding GDI lock\n" ); DebugBreak();
1
0
0
0
Sebastian Lackner : ntdll: Implement RtlIsCriticalSectionLocked[ByThread].
by Alexandre Julliard
12 Oct '15
12 Oct '15
Module: wine Branch: master Commit: 7c46763ea786293ad93e44fe0658fbe1bf188a63 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7c46763ea786293ad93e44fe0…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Sat Oct 10 05:39:50 2015 +0200 ntdll: Implement RtlIsCriticalSectionLocked[ByThread]. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/critsection.c | 37 +++++++++++++++++++++++++++++++++++++ dlls/ntdll/ntdll.spec | 2 ++ dlls/ntdll/tests/rtl.c | 2 +- include/winternl.h | 2 ++ 4 files changed, 42 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/critsection.c b/dlls/ntdll/critsection.c index 6e0332b..e2eb364 100644 --- a/dlls/ntdll/critsection.c +++ b/dlls/ntdll/critsection.c @@ -610,6 +610,43 @@ BOOL WINAPI RtlTryEnterCriticalSection( RTL_CRITICAL_SECTION *crit ) /*********************************************************************** + * RtlIsCriticalSectionLocked (NTDLL.@) + * + * Checks if the critical section is locked by any thread. + * + * PARAMS + * crit [I/O] Critical section to check. + * + * RETURNS + * Success: TRUE. The critical section is locked. + * Failure: FALSE. The critical section is not locked. + */ +BOOL WINAPI RtlIsCriticalSectionLocked( RTL_CRITICAL_SECTION *crit ) +{ + return crit->RecursionCount != 0; +} + + +/*********************************************************************** + * RtlIsCriticalSectionLockedByThread (NTDLL.@) + * + * Checks if the critical section is locked by the current thread. + * + * PARAMS + * crit [I/O] Critical section to check. + * + * RETURNS + * Success: TRUE. The critical section is locked. + * Failure: FALSE. The critical section is not locked. + */ +BOOL WINAPI RtlIsCriticalSectionLockedByThread( RTL_CRITICAL_SECTION *crit ) +{ + return crit->OwningThread == ULongToHandle(GetCurrentThreadId()) && + crit->RecursionCount; +} + + +/*********************************************************************** * RtlLeaveCriticalSection (NTDLL.@) * * Leaves a critical section. diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 6b3fc65..7f07b14 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -719,6 +719,8 @@ # @ stub RtlIpv6StringToAddressExW # @ stub RtlIpv6StringToAddressW @ stdcall RtlIsActivationContextActive(ptr) +@ stdcall RtlIsCriticalSectionLocked(ptr) +@ stdcall RtlIsCriticalSectionLockedByThread(ptr) @ stdcall RtlIsDosDeviceName_U(wstr) @ stub RtlIsGenericTableEmpty # @ stub RtlIsGenericTableEmptyAvl diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c index 4ab3d1e..0f79f7d 100644 --- a/dlls/ntdll/tests/rtl.c +++ b/dlls/ntdll/tests/rtl.c @@ -2008,7 +2008,7 @@ static void test_RtlIsCriticalSectionLocked(void) if (!pRtlIsCriticalSectionLocked || !pRtlIsCriticalSectionLockedByThread) { - skip("skipping RtlIsCriticalSectionLocked tests, required functions not available\n"); + win_skip("skipping RtlIsCriticalSectionLocked tests, required functions not available\n"); return; } diff --git a/include/winternl.h b/include/winternl.h index 3e64b4d..e76114e 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -2483,6 +2483,8 @@ NTSYSAPI NTSTATUS WINAPI RtlInt64ToUnicodeString(ULONGLONG,ULONG,UNICODE_STRING NTSYSAPI NTSTATUS WINAPI RtlIntegerToChar(ULONG,ULONG,ULONG,PCHAR); NTSYSAPI NTSTATUS WINAPI RtlIntegerToUnicodeString(ULONG,ULONG,UNICODE_STRING *); NTSYSAPI BOOLEAN WINAPI RtlIsActivationContextActive(HANDLE); +NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLocked(RTL_CRITICAL_SECTION *); +NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLockedByThread(RTL_CRITICAL_SECTION *); NTSYSAPI ULONG WINAPI RtlIsDosDeviceName_U(PCWSTR); NTSYSAPI BOOLEAN WINAPI RtlIsNameLegalDOS8Dot3(const UNICODE_STRING*,POEM_STRING,PBOOLEAN); NTSYSAPI BOOLEAN WINAPI RtlIsTextUnicode(LPCVOID,INT,INT *);
1
0
0
0
Sebastian Lackner : ntdll/tests: Add tests for RtlIsCriticalSectionLocked[ ByThread].
by Alexandre Julliard
12 Oct '15
12 Oct '15
Module: wine Branch: master Commit: b028f2c07697f75db7b93f940a320a30176f56d0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b028f2c07697f75db7b93f940…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Sat Oct 10 05:39:35 2015 +0200 ntdll/tests: Add tests for RtlIsCriticalSectionLocked[ByThread]. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/rtl.c | 101 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c index ce23310..4ab3d1e 100644 --- a/dlls/ntdll/tests/rtl.c +++ b/dlls/ntdll/tests/rtl.c @@ -96,6 +96,8 @@ static NTSTATUS (WINAPI *pRtlGetCompressionWorkSpaceSize)(USHORT, PULONG, PULON static NTSTATUS (WINAPI *pRtlDecompressBuffer)(USHORT, PUCHAR, ULONG, const UCHAR*, ULONG, PULONG); static NTSTATUS (WINAPI *pRtlDecompressFragment)(USHORT, PUCHAR, ULONG, const UCHAR*, ULONG, ULONG, PULONG, PVOID); static NTSTATUS (WINAPI *pRtlCompressBuffer)(USHORT, const UCHAR*, ULONG, PUCHAR, ULONG, ULONG, PULONG, PVOID); +static BOOL (WINAPI *pRtlIsCriticalSectionLocked)(RTL_CRITICAL_SECTION *); +static BOOL (WINAPI *pRtlIsCriticalSectionLockedByThread)(RTL_CRITICAL_SECTION *); static HMODULE hkernel32 = 0; static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL); @@ -147,6 +149,8 @@ static void InitFunctionPtrs(void) pRtlDecompressBuffer = (void *)GetProcAddress(hntdll, "RtlDecompressBuffer"); pRtlDecompressFragment = (void *)GetProcAddress(hntdll, "RtlDecompressFragment"); pRtlCompressBuffer = (void *)GetProcAddress(hntdll, "RtlCompressBuffer"); + pRtlIsCriticalSectionLocked = (void *)GetProcAddress(hntdll, "RtlIsCriticalSectionLocked"); + pRtlIsCriticalSectionLockedByThread = (void *)GetProcAddress(hntdll, "RtlIsCriticalSectionLockedByThread"); } hkernel32 = LoadLibraryA("kernel32.dll"); ok(hkernel32 != 0, "LoadLibrary failed\n"); @@ -1956,6 +1960,102 @@ static void test_RtlDecompressBuffer(void) #undef DECOMPRESS_BROKEN_FRAGMENT #undef DECOMPRESS_BROKEN_TRUNCATED +struct critsect_locked_info +{ + CRITICAL_SECTION crit; + HANDLE semaphores[2]; +}; + +static DWORD WINAPI critsect_locked_thread(void *param) +{ + struct critsect_locked_info *info = param; + DWORD ret; + + ret = pRtlIsCriticalSectionLocked(&info->crit); + ok(ret == TRUE, "expected TRUE, got %u\n", ret); + ret = pRtlIsCriticalSectionLockedByThread(&info->crit); + ok(ret == FALSE, "expected FALSE, got %u\n", ret); + + ReleaseSemaphore(info->semaphores[0], 1, NULL); + ret = WaitForSingleObject(info->semaphores[1], 1000); + ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", ret); + + ret = pRtlIsCriticalSectionLocked(&info->crit); + ok(ret == FALSE, "expected FALSE, got %u\n", ret); + ret = pRtlIsCriticalSectionLockedByThread(&info->crit); + ok(ret == FALSE, "expected FALSE, got %u\n", ret); + + EnterCriticalSection(&info->crit); + + ret = pRtlIsCriticalSectionLocked(&info->crit); + ok(ret == TRUE, "expected TRUE, got %u\n", ret); + ret = pRtlIsCriticalSectionLockedByThread(&info->crit); + ok(ret == TRUE, "expected TRUE, got %u\n", ret); + + ReleaseSemaphore(info->semaphores[0], 1, NULL); + ret = WaitForSingleObject(info->semaphores[1], 1000); + ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", ret); + + LeaveCriticalSection(&info->crit); + return 0; +} + +static void test_RtlIsCriticalSectionLocked(void) +{ + struct critsect_locked_info info; + HANDLE thread; + BOOL ret; + + if (!pRtlIsCriticalSectionLocked || !pRtlIsCriticalSectionLockedByThread) + { + skip("skipping RtlIsCriticalSectionLocked tests, required functions not available\n"); + return; + } + + InitializeCriticalSection(&info.crit); + info.semaphores[0] = CreateSemaphoreW(NULL, 0, 1, NULL); + ok(info.semaphores[0] != NULL, "CreateSemaphore failed with %u\n", GetLastError()); + info.semaphores[1] = CreateSemaphoreW(NULL, 0, 1, NULL); + ok(info.semaphores[1] != NULL, "CreateSemaphore failed with %u\n", GetLastError()); + + ret = pRtlIsCriticalSectionLocked(&info.crit); + ok(ret == FALSE, "expected FALSE, got %u\n", ret); + ret = pRtlIsCriticalSectionLockedByThread(&info.crit); + ok(ret == FALSE, "expected FALSE, got %u\n", ret); + + EnterCriticalSection(&info.crit); + + ret = pRtlIsCriticalSectionLocked(&info.crit); + ok(ret == TRUE, "expected TRUE, got %u\n", ret); + ret = pRtlIsCriticalSectionLockedByThread(&info.crit); + ok(ret == TRUE, "expected TRUE, got %u\n", ret); + + thread = CreateThread(NULL, 0, critsect_locked_thread, &info, 0, NULL); + ok(thread != NULL, "CreateThread failed with %u\n", GetLastError()); + ret = WaitForSingleObject(info.semaphores[0], 1000); + ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", ret); + + LeaveCriticalSection(&info.crit); + + ReleaseSemaphore(info.semaphores[1], 1, NULL); + ret = WaitForSingleObject(info.semaphores[0], 1000); + ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", ret); + + ret = pRtlIsCriticalSectionLocked(&info.crit); + ok(ret == TRUE, "expected TRUE, got %u\n", ret); + ret = pRtlIsCriticalSectionLockedByThread(&info.crit); + ok(ret == FALSE, "expected FALSE, got %u\n", ret); + + ReleaseSemaphore(info.semaphores[1], 1, NULL); + ret = WaitForSingleObject(thread, 1000); + ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", ret); + + CloseHandle(thread); + CloseHandle(info.semaphores[0]); + CloseHandle(info.semaphores[1]); + DeleteCriticalSection(&info.crit); +} + START_TEST(rtl) { InitFunctionPtrs(); @@ -1985,4 +2085,5 @@ START_TEST(rtl) test_RtlCompressBuffer(); test_RtlGetCompressionWorkSpaceSize(); test_RtlDecompressBuffer(); + test_RtlIsCriticalSectionLocked(); }
1
0
0
0
Sebastian Lackner : ntdll: Synchronize Nt and Zw exports.
by Alexandre Julliard
12 Oct '15
12 Oct '15
Module: wine Branch: master Commit: ea87d1c317b6c0187006d30002da0be79629afb0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ea87d1c317b6c0187006d3000…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Sat Oct 10 05:39:21 2015 +0200 ntdll: Synchronize Nt and Zw exports. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/ntdll.spec | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index ca3561d..6b3fc65 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -162,9 +162,9 @@ @ stdcall NtDuplicateToken(long long long long long long) # @ stub NtEnumerateBootEntries @ stub NtEnumerateBus -@ stdcall NtEnumerateKey (long long long long long long) +@ stdcall NtEnumerateKey(long long long ptr long ptr) # @ stub NtEnumerateSystemEnvironmentValuesEx -@ stdcall NtEnumerateValueKey (long long long long long long) +@ stdcall NtEnumerateValueKey(long long long ptr long ptr) @ stub NtExtendSection # @ stub NtFilterToken @ stdcall NtFindAtom(ptr long ptr) @@ -273,7 +273,7 @@ @ stdcall NtQuerySystemTime(ptr) @ stdcall NtQueryTimer(ptr long ptr long ptr) @ stdcall NtQueryTimerResolution(long long long) -@ stdcall NtQueryValueKey(long long long long long long) +@ stdcall NtQueryValueKey(long ptr long ptr long ptr) @ stdcall NtQueryVirtualMemory(long ptr long ptr long ptr) @ stdcall NtQueryVolumeInformationFile(long ptr ptr long long) @ stdcall NtQueueApcThread(long ptr long long long) @@ -1010,7 +1010,7 @@ # @ stub ZwAccessCheckByTypeResultListAndAuditAlarmByHandle @ stdcall ZwAddAtom(ptr long ptr) NtAddAtom # @ stub ZwAddBootEntry -@ stdcall ZwAdjustGroupsToken(long long long long long long) NtAdjustGroupsToken +@ stdcall ZwAdjustGroupsToken(long long ptr long ptr ptr) NtAdjustGroupsToken @ stdcall ZwAdjustPrivilegesToken(long long long long long long) NtAdjustPrivilegesToken @ stdcall ZwAlertResumeThread(long ptr) NtAlertResumeThread @ stdcall ZwAlertThread(long) NtAlertThread @@ -1048,7 +1048,7 @@ @ stdcall ZwCreateMutant(ptr long ptr long) NtCreateMutant @ stdcall ZwCreateNamedPipeFile(ptr long ptr ptr long long long long long long long long long ptr) NtCreateNamedPipeFile @ stdcall ZwCreatePagingFile(long long long long) NtCreatePagingFile -@ stdcall ZwCreatePort(ptr ptr long long long) NtCreatePort +@ stdcall ZwCreatePort(ptr ptr long long ptr) NtCreatePort @ stub ZwCreateProcess # @ stub ZwCreateProcessEx @ stub ZwCreateProfile @@ -1089,11 +1089,12 @@ @ stdcall ZwFreeVirtualMemory(long ptr ptr long) NtFreeVirtualMemory @ stdcall ZwFsControlFile(long long long long long long long long long long) NtFsControlFile @ stdcall ZwGetContextThread(long ptr) NtGetContextThread +@ stdcall ZwGetCurrentProcessorNumber() NtGetCurrentProcessorNumber # @ stub ZwGetDevicePowerState @ stub ZwGetPlugPlayEvent @ stdcall ZwGetTickCount() NtGetTickCount @ stdcall ZwGetWriteWatch(long long ptr long ptr ptr ptr) NtGetWriteWatch -# @ stub ZwImpersonateAnonymousToken +@ stdcall ZwImpersonateAnonymousToken(long) NtImpersonateAnonymousToken @ stub ZwImpersonateClientOfPort @ stub ZwImpersonateThread @ stub ZwInitializeRegistry @@ -1171,15 +1172,15 @@ @ stdcall ZwQueryMutant(long long ptr long ptr) NtQueryMutant @ stdcall ZwQueryObject(long long long long long) NtQueryObject @ stub ZwQueryOpenSubKeys -@ stdcall ZwQueryPerformanceCounter (long long) NtQueryPerformanceCounter +@ stdcall ZwQueryPerformanceCounter(ptr ptr) NtQueryPerformanceCounter # @ stub ZwQueryPortInformationProcess # @ stub ZwQueryQuotaInformationFile @ stdcall ZwQuerySection (long long long long long) NtQuerySection @ stdcall ZwQuerySecurityObject (long long long long long) NtQuerySecurityObject -@ stdcall ZwQuerySemaphore (long long long long long) NtQuerySemaphore +@ stdcall ZwQuerySemaphore(long long ptr long ptr) NtQuerySemaphore @ stdcall ZwQuerySymbolicLinkObject(long ptr ptr) NtQuerySymbolicLinkObject -@ stub ZwQuerySystemEnvironmentValue -# @ stub ZwQuerySystemEnvironmentValueEx +@ stdcall ZwQuerySystemEnvironmentValue(ptr ptr long ptr) NtQuerySystemEnvironmentValue +@ stdcall ZwQuerySystemEnvironmentValueEx(ptr ptr ptr ptr ptr) NtQuerySystemEnvironmentValueEx @ stdcall ZwQuerySystemInformation(long long long long) NtQuerySystemInformation @ stdcall ZwQuerySystemTime(ptr) NtQuerySystemTime @ stdcall ZwQueryTimer(ptr long ptr long ptr) NtQueryTimer @@ -1189,7 +1190,7 @@ @ stdcall ZwQueryVolumeInformationFile(long ptr ptr long long) NtQueryVolumeInformationFile @ stdcall ZwQueueApcThread(long ptr long long long) NtQueueApcThread @ stdcall ZwRaiseException(ptr ptr long) NtRaiseException -@ stub ZwRaiseHardError +@ stdcall ZwRaiseHardError(long long ptr ptr long long) NtRaiseHardError @ stdcall ZwReadFile(long long ptr ptr ptr ptr long ptr ptr) NtReadFile @ stdcall ZwReadFileScatter(long long ptr ptr ptr ptr long ptr ptr) NtReadFileScatter @ stub ZwReadRequestData @@ -1206,7 +1207,7 @@ @ stdcall ZwReplaceKey(ptr long ptr) NtReplaceKey @ stub ZwReplyPort @ stdcall ZwReplyWaitReceivePort(ptr ptr ptr ptr) NtReplyWaitReceivePort -# @ stub ZwReplyWaitReceivePortEx +@ stub ZwReplyWaitReceivePortEx @ stub ZwReplyWaitReplyPort # @ stub ZwRequestDeviceWakeup @ stub ZwRequestPort @@ -1224,7 +1225,7 @@ # @ stub ZwSetBootEntryOrder # @ stub ZwSetBootOptions @ stdcall ZwSetContextThread(long ptr) NtSetContextThread -# @ stub ZwSetDebugFilterState +@ stub ZwSetDebugFilterState @ stub ZwSetDefaultHardErrorPort @ stdcall ZwSetDefaultLocale(long long) NtSetDefaultLocale @ stdcall ZwSetDefaultUILanguage(long) NtSetDefaultUILanguage
1
0
0
0
← Newer
1
...
44
45
46
47
48
49
50
...
75
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Results per page:
10
25
50
100
200