Author: akhaldi Date: Fri Dec 12 13:08:59 2014 New Revision: 65614
URL: http://svn.reactos.org/svn/reactos?rev=65614&view=rev Log: [SHIMGVW] Fix DLL stubs, intended to fix a crash on Windows. Patch by Ricardo Hanke. CORE-8073 #resolve #comment Committed in r65614. Thanks!
Added: trunk/reactos/dll/win32/shimgvw/comsup.c (with props) trunk/reactos/dll/win32/shimgvw/comsup.h (with props) Modified: trunk/reactos/dll/win32/shimgvw/CMakeLists.txt trunk/reactos/dll/win32/shimgvw/shimgvw.spec
Modified: trunk/reactos/dll/win32/shimgvw/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shimgvw/CMakeList... ============================================================================== --- trunk/reactos/dll/win32/shimgvw/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shimgvw/CMakeLists.txt [iso-8859-1] Fri Dec 12 13:08:59 2014 @@ -3,6 +3,7 @@
list(APPEND SOURCE shimgvw.c + comsup.c shimgvw.rc ${CMAKE_CURRENT_BINARY_DIR}/shimgvw_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/shimgvw.def)
Added: trunk/reactos/dll/win32/shimgvw/comsup.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shimgvw/comsup.c?... ============================================================================== --- trunk/reactos/dll/win32/shimgvw/comsup.c (added) +++ trunk/reactos/dll/win32/shimgvw/comsup.c [iso-8859-1] Fri Dec 12 13:08:59 2014 @@ -0,0 +1,58 @@ +#define INITGUID + +#include <windef.h> +#include <comsup.h> + +LONG LockCount; +LONG ObjectCount; + + +VOID +DllInitServer(VOID) +{ + ObjectCount = 0; + LockCount = 0; +} + + +STDAPI +DllRegisterServer(VOID) +{ + /* Always return S_OK, since there is currently nothing that can go wrong */ + return S_OK; +} + + +STDAPI +DllUnregisterServer(VOID) +{ + /* Always return S_OK, since there is currently nothing that can go wrong */ + return S_OK; +} + + +STDAPI +DllCanUnloadNow(VOID) +{ + if ((ObjectCount != 0) || (LockCount != 0)) + { + return S_FALSE; + } + else + { + return S_OK; + } +} + + +STDAPI +DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) +{ + HRESULT hr; + + /* There are no classes to export, so always return CLASS_E_CLASSNOTAVAILABLE*/ + *ppv = NULL; + hr = CLASS_E_CLASSNOTAVAILABLE; + + return hr; +}
Propchange: trunk/reactos/dll/win32/shimgvw/comsup.c ------------------------------------------------------------------------------ svn:eol-style = native
Added: trunk/reactos/dll/win32/shimgvw/comsup.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shimgvw/comsup.h?... ============================================================================== --- trunk/reactos/dll/win32/shimgvw/comsup.h (added) +++ trunk/reactos/dll/win32/shimgvw/comsup.h [iso-8859-1] Fri Dec 12 13:08:59 2014 @@ -0,0 +1,4 @@ +extern LONG LockCount; +extern LONG ObjectCount; + +VOID DllInitServer(VOID);
Propchange: trunk/reactos/dll/win32/shimgvw/comsup.h ------------------------------------------------------------------------------ svn:eol-style = native
Modified: trunk/reactos/dll/win32/shimgvw/shimgvw.spec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shimgvw/shimgvw.s... ============================================================================== --- trunk/reactos/dll/win32/shimgvw/shimgvw.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shimgvw/shimgvw.spec [iso-8859-1] Fri Dec 12 13:08:59 2014 @@ -7,8 +7,8 @@ @ stdcall ImageView_PrintToW(ptr ptr wstr long) @ stdcall imageview_fullscreenW(ptr ptr wstr long) ImageView_FullscreenW @ stub ConvertDIBSECTIONToThumbnail -@ stub -private DllCanUnloadNow -@ stub -private DllGetClassObject +@ stdcall -private DllCanUnloadNow() +@ stdcall -private DllGetClassObject(ptr ptr ptr) @ stub -private DllInstall -@ stub -private DllRegisterServer -@ stub -private DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer()