From dc23cca322a93915465a1ea3ca6f360106cd2018 Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Tue, 13 Aug 2019 19:57:47 -0600 Subject: [PATCH] utildll: Add DLL. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47616 Signed-off-by: Alex Henrie Signed-off-by: Alexandre Julliard --- configure | 2 ++ configure.ac | 1 + dlls/utildll/Makefile.in | 6 ++++++ dlls/utildll/main.c | 43 +++++++++++++++++++++++++++++++++++++++ dlls/utildll/utildll.spec | 36 ++++++++++++++++++++++++++++++++ 5 files changed, 88 insertions(+) create mode 100644 dlls/utildll/Makefile.in create mode 100644 dlls/utildll/main.c create mode 100644 dlls/utildll/utildll.spec diff --git a/configure b/configure index 702023b68c3..19a56c9d0fb 100755 --- a/configure +++ b/configure @@ -1585,6 +1585,7 @@ enable_usbd_sys enable_user32 enable_userenv enable_usp10 +enable_utildll enable_uuid enable_uxtheme enable_vbscript @@ -20689,6 +20690,7 @@ wine_fn_config_makefile dlls/userenv enable_userenv wine_fn_config_makefile dlls/userenv/tests enable_tests wine_fn_config_makefile dlls/usp10 enable_usp10 wine_fn_config_makefile dlls/usp10/tests enable_tests +wine_fn_config_makefile dlls/utildll enable_utildll wine_fn_config_makefile dlls/uuid enable_uuid wine_fn_config_makefile dlls/uxtheme enable_uxtheme wine_fn_config_makefile dlls/uxtheme/tests enable_tests diff --git a/configure.ac b/configure.ac index 499c4f37cae..6ce39b89001 100644 --- a/configure.ac +++ b/configure.ac @@ -3673,6 +3673,7 @@ WINE_CONFIG_MAKEFILE(dlls/userenv) WINE_CONFIG_MAKEFILE(dlls/userenv/tests) WINE_CONFIG_MAKEFILE(dlls/usp10) WINE_CONFIG_MAKEFILE(dlls/usp10/tests) +WINE_CONFIG_MAKEFILE(dlls/utildll) WINE_CONFIG_MAKEFILE(dlls/uuid) WINE_CONFIG_MAKEFILE(dlls/uxtheme) WINE_CONFIG_MAKEFILE(dlls/uxtheme/tests) diff --git a/dlls/utildll/Makefile.in b/dlls/utildll/Makefile.in new file mode 100644 index 00000000000..5bd9a6fa0e0 --- /dev/null +++ b/dlls/utildll/Makefile.in @@ -0,0 +1,6 @@ +MODULE = utildll.dll + +EXTRADLLFLAGS = -mno-cygwin + +C_SRCS = \ + main.c diff --git a/dlls/utildll/main.c b/dlls/utildll/main.c new file mode 100644 index 00000000000..e0487944340 --- /dev/null +++ b/dlls/utildll/main.c @@ -0,0 +1,43 @@ +/* + * Utility Functions + * + * Copyright 2019 Alex Henrie + * + * 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 + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(utildll); + +BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) +{ + TRACE("(%p, %u, %p)\n", instance, reason, reserved); + + switch (reason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(instance); + break; + } + + return TRUE; +} diff --git a/dlls/utildll/utildll.spec b/dlls/utildll/utildll.spec new file mode 100644 index 00000000000..bb041666851 --- /dev/null +++ b/dlls/utildll/utildll.spec @@ -0,0 +1,36 @@ +@ stub AsyncDeviceEnumerate +@ stub CachedGetUserFromSid +@ stub CalculateDiffTime +@ stub CalculateElapsedTime +@ stub CompareElapsedTime +@ stub ConfigureModem +@ stub CtxGetAnyDCName +@ stub CurrentDateTimeString +@ stub DateTimeString +@ stub ElapsedTimeString +@ stub EnumerateMultiUserServers +@ stub FormDecoratedAsyncDeviceName +@ stub GetAssociatedPortName +@ stub GetSystemMessageA +@ stub GetSystemMessageW +@ stub GetUnknownString +@ stub GetUserFromSid +@ stub HaveAnonymousUsersChanged +@ stub InitializeAnonymousUserCompareList +@ stub InstallModem +@ stub IsPartOfDomain +@ stub NetBIOSDeviceEnumerate +@ stub NetworkDeviceEnumerate +@ stub ParseDecoratedAsyncDeviceName +@ stub QueryCurrentWinStation +@ stub RegGetNetworkDeviceName +@ stub RegGetNetworkServiceName +@ stub SetupAsyncCdConfig +@ stub StandardErrorMessage +@ stub StrAsyncConnectState +@ stub StrConnectState +@ stub StrProcessState +@ stub StrSdClass +@ stub StrSystemWaitReason +@ stub TestUserForAdmin +@ stub WinEnumerateDevices