From e7053c1100b6758c9dcd5bde285bec959d136e9c Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Sat, 25 Jan 2014 18:42:34 +0100 Subject: [PATCH] wmp: Added new DLL. --- configure | 2 ++ configure.ac | 1 + dlls/wmp/Makefile.in | 4 +++ dlls/wmp/wmp.spec | 4 +++ dlls/wmp/wmp_main.c | 82 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 93 insertions(+) create mode 100644 dlls/wmp/Makefile.in create mode 100644 dlls/wmp/wmp.spec create mode 100644 dlls/wmp/wmp_main.c diff --git a/configure b/configure index c2d0dd087e2..e3b45e2b904 100755 --- a/configure +++ b/configure @@ -1239,6 +1239,7 @@ enable_wlanapi enable_wldap32 enable_wmi enable_wmiutils +enable_wmp enable_wmvcore enable_wnaspi32 enable_ws2_32 @@ -17102,6 +17103,7 @@ wine_fn_config_test dlls/wldap32/tests wldap32_test wine_fn_config_dll wmi enable_wmi wine_fn_config_dll wmiutils enable_wmiutils clean wine_fn_config_test dlls/wmiutils/tests wmiutils_test +wine_fn_config_dll wmp enable_wmp wine_fn_config_dll wmvcore enable_wmvcore wine_fn_config_dll wnaspi32 enable_wnaspi32 implib wine_fn_config_dll wow32 enable_win16 implib diff --git a/configure.ac b/configure.ac index 4f51909fade..774404487b1 100644 --- a/configure.ac +++ b/configure.ac @@ -3226,6 +3226,7 @@ WINE_CONFIG_TEST(dlls/wldap32/tests) WINE_CONFIG_DLL(wmi) WINE_CONFIG_DLL(wmiutils,,[clean]) WINE_CONFIG_TEST(dlls/wmiutils/tests) +WINE_CONFIG_DLL(wmp) WINE_CONFIG_DLL(wmvcore) WINE_CONFIG_DLL(wnaspi32,,[implib]) WINE_CONFIG_DLL(wow32,enable_win16,[implib]) diff --git a/dlls/wmp/Makefile.in b/dlls/wmp/Makefile.in new file mode 100644 index 00000000000..7d343241369 --- /dev/null +++ b/dlls/wmp/Makefile.in @@ -0,0 +1,4 @@ +MODULE = wmp.dll + +C_SRCS = \ + wmp_main.c diff --git a/dlls/wmp/wmp.spec b/dlls/wmp/wmp.spec new file mode 100644 index 00000000000..b16365d0c9f --- /dev/null +++ b/dlls/wmp/wmp.spec @@ -0,0 +1,4 @@ +@ stdcall -private DllCanUnloadNow() +@ stdcall -private DllGetClassObject(ptr ptr ptr) +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() diff --git a/dlls/wmp/wmp_main.c b/dlls/wmp/wmp_main.c new file mode 100644 index 00000000000..c0933f242de --- /dev/null +++ b/dlls/wmp/wmp_main.c @@ -0,0 +1,82 @@ +/* + * Copyright 2014 Jacek Caban for CodeWeavers + * + * 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 "windows.h" +#include "ole2.h" +#include "rpcproxy.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(wmp); + +static HINSTANCE wmp_instance; + +/****************************************************************** + * DllMain (wmp.@) + */ +BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) +{ + TRACE("(%p %d %p)\n", hInstDLL, fdwReason, lpv); + + switch(fdwReason) { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hInstDLL); + wmp_instance = hInstDLL; + break; + } + + return TRUE; +} + +/*********************************************************************** + * DllGetClassObject (wmp.@) + */ +HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) +{ + FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + return CLASS_E_CLASSNOTAVAILABLE; +} + +/*********************************************************************** + * DllCanUnloadNow (wmp.@) + */ +HRESULT WINAPI DllCanUnloadNow(void) +{ + TRACE("\n"); + return S_FALSE; +} + +/*********************************************************************** + * DllRegisterServer (wmp.@) + */ +HRESULT WINAPI DllRegisterServer(void) +{ + TRACE("()\n"); + return __wine_register_resources(wmp_instance); +} + +/*********************************************************************** + * DllUnregisterServer (wmp.@) + */ +HRESULT WINAPI DllUnregisterServer(void) +{ + TRACE("()\n"); + return __wine_unregister_resources(wmp_instance); +}