Author: mjansen Date: Fri Dec 16 22:05:58 2016 New Revision: 73463
URL: http://svn.reactos.org/svn/reactos?rev=73463&view=rev Log: [ACGENRAL] Implement the DisableThemes shim. CORE-11927
Added: trunk/reactos/dll/appcompat/shims/genral/ trunk/reactos/dll/appcompat/shims/genral/CMakeLists.txt (with props) trunk/reactos/dll/appcompat/shims/genral/genral.spec (with props) trunk/reactos/dll/appcompat/shims/genral/main.c (with props) trunk/reactos/dll/appcompat/shims/genral/themes.c (with props) Modified: trunk/reactos/dll/appcompat/shims/CMakeLists.txt
Modified: trunk/reactos/dll/appcompat/shims/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/appcompat/shims/CMakeLi... ============================================================================== --- trunk/reactos/dll/appcompat/shims/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/appcompat/shims/CMakeLists.txt [iso-8859-1] Fri Dec 16 22:05:58 2016 @@ -1,4 +1,5 @@
add_subdirectory(shimlib) +add_subdirectory(genral) add_subdirectory(layer)
Added: trunk/reactos/dll/appcompat/shims/genral/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/appcompat/shims/genral/... ============================================================================== --- trunk/reactos/dll/appcompat/shims/genral/CMakeLists.txt (added) +++ trunk/reactos/dll/appcompat/shims/genral/CMakeLists.txt [iso-8859-1] Fri Dec 16 22:05:58 2016 @@ -0,0 +1,18 @@ + +include_directories(${SHIMLIB_DIR}) + +spec2def(acgenral.dll genral.spec) + +list(APPEND SOURCE + main.c + themes.c + genral.spec) + +add_library(acgenral SHARED + ${SOURCE} + ${CMAKE_CURRENT_BINARY_DIR}/acgenral.def) + +set_module_type(acgenral win32dll) +target_link_libraries(acgenral shimlib) +add_importlibs(acgenral uxtheme msvcrt kernel32 ntdll) +add_cd_file(TARGET acgenral DESTINATION reactos/AppPatch FOR all)
Propchange: trunk/reactos/dll/appcompat/shims/genral/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native
Added: trunk/reactos/dll/appcompat/shims/genral/genral.spec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/appcompat/shims/genral/... ============================================================================== --- trunk/reactos/dll/appcompat/shims/genral/genral.spec (added) +++ trunk/reactos/dll/appcompat/shims/genral/genral.spec [iso-8859-1] Fri Dec 16 22:05:58 2016 @@ -0,0 +1,3 @@ + +@ stdcall GetHookAPIs(str wstr ptr) +@ stdcall NotifyShims(long ptr)
Propchange: trunk/reactos/dll/appcompat/shims/genral/genral.spec ------------------------------------------------------------------------------ svn:eol-style = native
Added: trunk/reactos/dll/appcompat/shims/genral/main.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/appcompat/shims/genral/... ============================================================================== --- trunk/reactos/dll/appcompat/shims/genral/main.c (added) +++ trunk/reactos/dll/appcompat/shims/genral/main.c [iso-8859-1] Fri Dec 16 22:05:58 2016 @@ -0,0 +1,37 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Shim library + * FILE: dll/appcompat/shims/genral/main.c + * PURPOSE: Shim entrypoint + * PROGRAMMER: Mark Jansen + */ + +#include <windows.h> +#include <strsafe.h> +#include <shimlib.h> + +/* Forward to the generic implementation */ +PHOOKAPI WINAPI GetHookAPIs(IN LPCSTR szCommandLine, IN LPCWSTR wszShimName, OUT PDWORD pdwHookCount) +{ + return ShimLib_GetHookAPIs(szCommandLine, wszShimName, pdwHookCount); +} + +/* Forward to the generic implementation */ +BOOL WINAPI NotifyShims(DWORD fdwReason, PVOID ptr) +{ + return ShimLib_NotifyShims(fdwReason, ptr); +} + +BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) +{ + switch(dwReason) + { + case DLL_PROCESS_ATTACH: + ShimLib_Init(hInstance); + break; + case DLL_PROCESS_DETACH: + ShimLib_Deinit(); + break; + } + return TRUE; +}
Propchange: trunk/reactos/dll/appcompat/shims/genral/main.c ------------------------------------------------------------------------------ svn:eol-style = native
Added: trunk/reactos/dll/appcompat/shims/genral/themes.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/appcompat/shims/genral/... ============================================================================== --- trunk/reactos/dll/appcompat/shims/genral/themes.c (added) +++ trunk/reactos/dll/appcompat/shims/genral/themes.c [iso-8859-1] Fri Dec 16 22:05:58 2016 @@ -0,0 +1,31 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Shim library + * FILE: dll/appcompat/shims/genral/themes.c + * PURPOSE: Theme related shims + * PROGRAMMER: Mark Jansen + */ + +#include <windows.h> +#include <shimlib.h> +#include <strsafe.h> +#include <uxtheme.h> + + +#define SHIM_NS DisableThemes +#include <setup_shim.inl> + +#define SHIM_NUM_HOOKS 0 +#define SHIM_NOTIFY_FN SHIM_OBJ_NAME(Notify) + +BOOL WINAPI SHIM_OBJ_NAME(Notify)(DWORD fdwReason, PVOID ptr) +{ + if (fdwReason == SHIM_REASON_INIT) + { + SetThemeAppProperties(0); + } + return TRUE; +} + +#include <implement_shim.inl> +
Propchange: trunk/reactos/dll/appcompat/shims/genral/themes.c ------------------------------------------------------------------------------ svn:eol-style = native