diff --git a/configure b/configure index 4cba95146a1..708d40d0f93 100755 --- a/configure +++ b/configure @@ -13958,6 +13958,14 @@ ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS dlls/avifile.dll16/Makefile: dlls/avifile.dll16/Makefile.in dlls/Makedll.rules" ac_config_files="$ac_config_files dlls/avifile.dll16/Makefile" +ALL_MAKEFILES="$ALL_MAKEFILES \\ + dlls/avrt/Makefile" +test "x$enable_avrt" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \\ + avrt" +ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS +dlls/avrt/Makefile: dlls/avrt/Makefile.in dlls/Makedll.rules" +ac_config_files="$ac_config_files dlls/avrt/Makefile" + ALL_MAKEFILES="$ALL_MAKEFILES \\ dlls/bcrypt/Makefile" test "x$enable_bcrypt" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \\ @@ -18796,6 +18804,7 @@ do "dlls/avicap32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/avicap32/Makefile" ;; "dlls/avifil32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/avifil32/Makefile" ;; "dlls/avifile.dll16/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/avifile.dll16/Makefile" ;; + "dlls/avrt/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/avrt/Makefile" ;; "dlls/bcrypt/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/bcrypt/Makefile" ;; "dlls/browseui/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/browseui/Makefile" ;; "dlls/browseui/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/browseui/tests/Makefile" ;; diff --git a/configure.ac b/configure.ac index 58b0d75922c..4a0161542e1 100644 --- a/configure.ac +++ b/configure.ac @@ -2131,6 +2131,7 @@ WINE_CONFIG_MAKEFILE([dlls/authz/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_ WINE_CONFIG_MAKEFILE([dlls/avicap32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/avifil32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/avifile.dll16/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS],[enable_win16]) +WINE_CONFIG_MAKEFILE([dlls/avrt/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/bcrypt/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/browseui/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/browseui/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests]) diff --git a/dlls/Makefile.in b/dlls/Makefile.in index 92f129f6173..4f0416a3d0a 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -72,6 +72,7 @@ IMPORT_LIBS = \ atl/libatl.$(IMPLIBEXT) \ avicap32/libavicap32.$(IMPLIBEXT) \ avifil32/libavifil32.$(IMPLIBEXT) \ + avrt/libavrt.$(IMPLIBEXT) \ cabinet/libcabinet.$(IMPLIBEXT) \ capi2032/libcapi2032.$(IMPLIBEXT) \ cards/libcards.$(IMPLIBEXT) \ @@ -218,6 +219,7 @@ CROSS_IMPLIBS = \ atl/libatl.a \ avicap32/libavicap32.a \ avifil32/libavifil32.a \ + avrt/libavrt.a \ cabinet/libcabinet.a \ capi2032/libcapi2032.a \ cards/libcards.a \ @@ -380,6 +382,9 @@ avicap32/libavicap32.def avicap32/libavicap32.a: avicap32/avicap32.spec $(WINEBU avifil32/libavifil32.def avifil32/libavifil32.a: avifil32/avifil32.spec $(WINEBUILD) @cd avifil32 && $(MAKE) `basename $@` +avrt/libavrt.def avrt/libavrt.a: avrt/avrt.spec $(WINEBUILD) + @cd avrt && $(MAKE) `basename $@` + cabinet/libcabinet.def cabinet/libcabinet.a: cabinet/cabinet.spec $(WINEBUILD) @cd cabinet && $(MAKE) `basename $@` diff --git a/dlls/avrt/Makefile.in b/dlls/avrt/Makefile.in new file mode 100644 index 00000000000..dc36c89a5bc --- /dev/null +++ b/dlls/avrt/Makefile.in @@ -0,0 +1,14 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = avrt.dll +IMPORTLIB = avrt +IMPORTS = user32 kernel32 ntdll + +C_SRCS = \ + main.c + +@MAKE_DLL_RULES@ + +@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/avrt/avrt.spec b/dlls/avrt/avrt.spec new file mode 100644 index 00000000000..103798d733c --- /dev/null +++ b/dlls/avrt/avrt.spec @@ -0,0 +1,14 @@ +@ stub AvQuerySystemResponsiveness +@ stub AvRevertMmThreadCharacteristics +@ stub AvRtCreateThreadOrderingGroup +@ stub AvRtCreateThreadOrderingGroupExA +@ stub AvRtCreateThreadOrderingGroupExW +@ stub AvRtDeleteThreadOrderingGroup +@ stub AvRtJoinThreadOrderingGroup +@ stub AvRtLeaveThreadOrderingGroup +@ stub AvRtWaitOnThreadOrderingGroup +@ stub AvSetMmMaxThreadCharacteristicsA +@ stub AvSetMmMaxThreadCharacteristicsW +@ stub AvSetMmThreadCharacteristicsA +@ stub AvSetMmThreadCharacteristicsW +@ stub AvSetMmThreadPriority diff --git a/dlls/avrt/main.c b/dlls/avrt/main.c new file mode 100644 index 00000000000..a39743c6a6e --- /dev/null +++ b/dlls/avrt/main.c @@ -0,0 +1,47 @@ +/* Avrt dll implementation + * + * Copyright (C) 2009 Maarten Lankhorst + * + * This program 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 program 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 program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" + +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" +#include "avrt.h" + +WINE_DEFAULT_DEBUG_CHANNEL(avrt); + +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); + + switch (fdwReason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hinstDLL); + break; + case DLL_PROCESS_DETACH: + break; + } + + return TRUE; +} diff --git a/include/avrt.h b/include/avrt.h index 691d36a5dde..2d0ab096bf4 100644 --- a/include/avrt.h +++ b/include/avrt.h @@ -57,7 +57,7 @@ BOOL WINAPI AvRtCreateThreadOrderingGroupExA( LPCSTR TaskName); BOOL WINAPI AvRtCreateThreadOrderingGroupExW( PHANDLE Context, PLARGE_INTEGER Period, - GUID *ThreadOrderingGuid, PLARGE_INTEGER Timeout + GUID *ThreadOrderingGuid, PLARGE_INTEGER Timeout, LPCSTR TaskName); #define AvRtCreateThreadOrderingGroupEx WINELIB_NAME_AW(AvRtCreateThreadOrderingGroupEx)