Skip to content

Commit

Permalink
7+ Taskbar Tweaker v5.14.1
Browse files Browse the repository at this point in the history
  • Loading branch information
m417z committed Mar 5, 2023
1 parent 6c456b7 commit 6d52992
Show file tree
Hide file tree
Showing 34 changed files with 1,673 additions and 504 deletions.
4 changes: 2 additions & 2 deletions 7 Taskbar Tweaker.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
# Visual Studio Version 17
VisualStudioVersion = 17.3.32901.215
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exe", "exe\exe.vcxproj", "{491CEFF7-3D89-43DC-8B8B-E13C8AFBE523}"
EndProject
Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# 7+ Taskbar Tweaker

This repository contains most of the source code of 7+ Taskbar Tweaker. The published version is fully functional on Windows 7, but is not functional on newer Windows versions due to omitted offsets. Some other boring functionality, such as the update checking mechanism, was omitted as well. Code which was omitted from the public source code has the ["omitted from public code"](https://github.com/m417z/7-Taskbar-Tweaker/search?q="omitted+from+public+code"&unscoped_q="omitted+from+public+code") comment near it.
7+ Taskbar Tweaker allows you to configure various aspects of the Windows
taskbar. Most of the configuration options it provides can’t be tweaked using
the taskbar properties or the registry.

The tweaker is designed for Windows 7, Windows 8, and Windows 10. Windows 11
isn't supported (See the notice on [this
page](https://ramensoftware.com/7-taskbar-tweaker) for more details).

![Screenshot](https://tweaker.ramensoftware.com/images/7-taskbar-tweaker.png)

## Links

* [Homepage](https://tweaker.ramensoftware.com/)
* [Discussion](https://ramensoftware.com/7-taskbar-tweaker)
* [Download](https://ramensoftware.com/downloads/7tt_setup.exe)
* [News](https://ramensoftware.com/tag/7-taskbar-tweaker)
8 changes: 4 additions & 4 deletions dll/7 Taskbar Tweaker.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,31 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<SpectreMitigation>false</SpectreMitigation>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<SpectreMitigation>false</SpectreMitigation>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<SpectreMitigation>false</SpectreMitigation>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<SpectreMitigation>false</SpectreMitigation>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
Expand Down
57 changes: 49 additions & 8 deletions dll/MinHook/MinHook.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,37 @@ typedef enum MH_STATUS

// Failed to create, or to wait for the main mutex.
MH_ERROR_MUTEX_FAILURE
}
MH_STATUS;
} MH_STATUS;

// The method of suspending and resuming threads.
//
// It's possible to add an additional method using PssCaptureSnapshot.
// Pros: Documented, fast.
// Cons: Available from Windows 8.1, less reliable.
typedef enum MH_THREAD_FREEZE_METHOD
{
// The original MinHook method, using CreateToolhelp32Snapshot. Documented
// and supported on all Windows versions, but very slow and less reliable.
MH_FREEZE_METHOD_ORIGINAL = 0,

// A much faster and more reliable, but undocumented method, using
// NtGetNextThread. Supported since Windows Vista, on older versions falls
// back to MH_ORIGINAL.
MH_FREEZE_METHOD_FAST_UNDOCUMENTED,

// Threads are not suspended and instruction pointer registers are not
// adjusted. Don't use this method unless you understand the implications
// and know that it's safe.
MH_FREEZE_METHOD_NONE_UNSAFE
} MH_THREAD_FREEZE_METHOD;

// Can be passed as a parameter to MH_EnableHook, MH_DisableHook,
// MH_QueueEnableHook or MH_QueueDisableHook.
#define MH_ALL_HOOKS NULL

#define MH_ALL_IDENTS 0
#define MH_DEFAULT_IDENT 1

#ifdef __cplusplus
extern "C" {
#endif
Expand All @@ -102,11 +126,14 @@ extern "C" {
// ONCE at the end of your program.
MH_STATUS WINAPI MH_Uninitialize(VOID);

// Set the method of suspending and resuming threads.
MH_STATUS WINAPI MH_SetThreadFreezeMethod(MH_THREAD_FREEZE_METHOD method);

// Creates a hook for the specified target function, in disabled state.
// Parameters:
// hookIdent [in] A hook identifier, can be set to different values for
// different hooks to hook the same function more than
// once. Default value: 0.
// once. Default value: MH_DEFAULT_IDENT.
// pTarget [in] A pointer to the target function, which will be
// overridden by the detour function.
// pDetour [in] A pointer to the detour function, which will override
Expand Down Expand Up @@ -152,16 +179,26 @@ extern "C" {
// Parameters:
// hookIdent [in] A hook identifier, can be set to different values for
// different hooks to hook the same function more than
// once. Default value: 0.
// once. Default value: MH_DEFAULT_IDENT.
// pTarget [in] A pointer to the target function.
// If this parameter is MH_ALL_HOOKS, all created hooks are
// removed in one go.
MH_STATUS WINAPI MH_RemoveHook(LPVOID pTarget);
MH_STATUS WINAPI MH_RemoveHookEx(ULONG_PTR hookIdent, LPVOID pTarget);

// Removes all disabled hooks.
// Parameters:
// hookIdent [in] A hook identifier, can be set to different values for
// different hooks to hook the same function more than
// once. Default value: MH_DEFAULT_IDENT.
MH_STATUS WINAPI MH_RemoveDisabledHooks();
MH_STATUS WINAPI MH_RemoveDisabledHooksEx(ULONG_PTR hookIdent);

// Enables an already created hook.
// Parameters:
// hookIdent [in] A hook identifier, can be set to different values for
// different hooks to hook the same function more than
// once. Default value: 0.
// once. Default value: MH_DEFAULT_IDENT.
// pTarget [in] A pointer to the target function.
// If this parameter is MH_ALL_HOOKS, all created hooks are
// enabled in one go.
Expand All @@ -172,7 +209,7 @@ extern "C" {
// Parameters:
// hookIdent [in] A hook identifier, can be set to different values for
// different hooks to hook the same function more than
// once. Default value: 0.
// once. Default value: MH_DEFAULT_IDENT.
// pTarget [in] A pointer to the target function.
// If this parameter is MH_ALL_HOOKS, all created hooks are
// disabled in one go.
Expand All @@ -183,7 +220,7 @@ extern "C" {
// Parameters:
// hookIdent [in] A hook identifier, can be set to different values for
// different hooks to hook the same function more than
// once. Default value: 0.
// once. Default value: MH_DEFAULT_IDENT.
// pTarget [in] A pointer to the target function.
// If this parameter is MH_ALL_HOOKS, all created hooks are
// queued to be enabled.
Expand All @@ -194,15 +231,19 @@ extern "C" {
// Parameters:
// hookIdent [in] A hook identifier, can be set to different values for
// different hooks to hook the same function more than
// once. Default value: 0.
// once. Default value: MH_DEFAULT_IDENT.
// pTarget [in] A pointer to the target function.
// If this parameter is MH_ALL_HOOKS, all created hooks are
// queued to be disabled.
MH_STATUS WINAPI MH_QueueDisableHook(LPVOID pTarget);
MH_STATUS WINAPI MH_QueueDisableHookEx(ULONG_PTR hookIdent, LPVOID pTarget);

// Applies all queued changes in one go.
// hookIdent [in] A hook identifier, can be set to different values for
// different hooks to hook the same function more than
// once. Default value: MH_DEFAULT_IDENT.
MH_STATUS WINAPI MH_ApplyQueued(VOID);
MH_STATUS WINAPI MH_ApplyQueuedEx(ULONG_PTR hookIdent);

// Translates the MH_STATUS to its name as a string.
const char * WINAPI MH_StatusToString(MH_STATUS status);
Expand Down
Binary file modified dll/MinHook/libMinHook.x64.lib
Binary file not shown.
Binary file modified dll/MinHook/libMinHook.x86.lib
Binary file not shown.
2 changes: 1 addition & 1 deletion dll/appid_lists.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static BOOL ListRemove(APPID_LIST **ppList, WCHAR *pStr);
static UINT ListCount(APPID_LIST *ppList);
static void ListFree(APPID_LIST **ppList);

static WCHAR *szSectionNames[AILISTS_COUNT] = {
static const WCHAR *szSectionNames[AILISTS_COUNT] = {
L"Labeling",
L"Grouping",
L"Pinned grouping",
Expand Down
Loading

0 comments on commit 6d52992

Please sign in to comment.