From 60cf559dc661cbf7dc7e9989df1357503fc330ad Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Sun, 10 Apr 2016 21:32:27 +0000 Subject: [PATCH] [SHELL32] Use the previously implemented Typelib registration from ATL to register shell32. ROSTESTS-209 svn path=/trunk/; revision=71142 --- reactos/dll/win32/shell32/CMakeLists.txt | 4 +++ reactos/dll/win32/shell32/shell32.cpp | 4 +-- reactos/dll/win32/shell32/shell32.rc | 2 ++ reactos/dll/win32/shell32/shell32_shldisp.idl | 25 +++++++++++++++++++ 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 reactos/dll/win32/shell32/shell32_shldisp.idl diff --git a/reactos/dll/win32/shell32/CMakeLists.txt b/reactos/dll/win32/shell32/CMakeLists.txt index 2a4f68ebcd4..10447ec0ad5 100644 --- a/reactos/dll/win32/shell32/CMakeLists.txt +++ b/reactos/dll/win32/shell32/CMakeLists.txt @@ -91,6 +91,10 @@ add_library(shell32 SHARED ${CMAKE_CURRENT_BINARY_DIR}/shell32_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/shell32.def) + +add_typelib(shell32_shldisp.idl) +set_source_files_properties(shell32.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/shell32_shldisp.tlb) + set_module_type(shell32 win32dll UNICODE) target_link_libraries(shell32 shellmenu shelldesktop atlnew wine uuid recyclebin) add_delay_importlibs(shell32 uxtheme ole32 oleaut32 userenv version fmifs) diff --git a/reactos/dll/win32/shell32/shell32.cpp b/reactos/dll/win32/shell32/shell32.cpp index 76c6e33b226..38d6e2f1a3f 100644 --- a/reactos/dll/win32/shell32/shell32.cpp +++ b/reactos/dll/win32/shell32/shell32.cpp @@ -350,7 +350,7 @@ STDAPI DllRegisterServer() { HRESULT hr; - hr = gModule.DllRegisterServer(FALSE); + hr = gModule.DllRegisterServer(TRUE); if (FAILED(hr)) return hr; @@ -372,7 +372,7 @@ STDAPI DllUnregisterServer() { HRESULT hr; - hr = gModule.DllUnregisterServer(FALSE); + hr = gModule.DllUnregisterServer(TRUE); if (FAILED(hr)) return hr; diff --git a/reactos/dll/win32/shell32/shell32.rc b/reactos/dll/win32/shell32/shell32.rc index 3f3aa273bc5..7ba3cdc4eea 100644 --- a/reactos/dll/win32/shell32/shell32.rc +++ b/reactos/dll/win32/shell32/shell32.rc @@ -79,6 +79,8 @@ END #include +1 TYPELIB "shell32_shldisp.tlb" + /* * Everything specific to any language goes * in one of the specific files. diff --git a/reactos/dll/win32/shell32/shell32_shldisp.idl b/reactos/dll/win32/shell32/shell32_shldisp.idl new file mode 100644 index 00000000000..1b910dc7ea5 --- /dev/null +++ b/reactos/dll/win32/shell32/shell32_shldisp.idl @@ -0,0 +1,25 @@ +/* + * Copyright 2011 Alexandre Julliard + * + * 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 + */ + +/* just a wrapper for shldisp.idl */ + +#pragma makedep proxy +#pragma makedep register + +#include "shldisp.idl" +