mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[SHIMGVW] Fix DLL stubs, intended to fix a crash on Windows. Patch by Ricardo Hanke.
CORE-8073 #resolve #comment Committed in r65614. Thanks! svn path=/trunk/; revision=65614
This commit is contained in:
parent
5bf209a1aa
commit
51fa01cea7
4 changed files with 67 additions and 4 deletions
|
@ -3,6 +3,7 @@ spec2def(shimgvw.dll shimgvw.spec)
|
|||
|
||||
list(APPEND SOURCE
|
||||
shimgvw.c
|
||||
comsup.c
|
||||
shimgvw.rc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/shimgvw_stubs.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/shimgvw.def)
|
||||
|
|
58
reactos/dll/win32/shimgvw/comsup.c
Normal file
58
reactos/dll/win32/shimgvw/comsup.c
Normal file
|
@ -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;
|
||||
}
|
4
reactos/dll/win32/shimgvw/comsup.h
Normal file
4
reactos/dll/win32/shimgvw/comsup.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
extern LONG LockCount;
|
||||
extern LONG ObjectCount;
|
||||
|
||||
VOID DllInitServer(VOID);
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue