Skip to content

Commit

Permalink
Fix KB5015882
Browse files Browse the repository at this point in the history
  • Loading branch information
ALTaleX531 committed Jul 22, 2022
1 parent 6df2dd2 commit 93734ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions TranslucentFlyouts/Win32HookHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,7 @@ HRESULT WINAPI TranslucentFlyoutsLib::MyDrawThemeTextEx(
!(pOptions->dwFlags & DTT_CALCRECT) and
!(pOptions->dwFlags & DTT_COMPOSITED)
)
) and
!VerifyCaller(g_hModule)
)
)
{
DTTOPTS Options = *pOptions;
Expand Down Expand Up @@ -456,7 +455,7 @@ HRESULT WINAPI TranslucentFlyoutsLib::MyDrawThemeText(

int WINAPI TranslucentFlyoutsLib::MyDrawTextW(
HDC hdc,
LPCTSTR lpchText,
LPCWSTR lpchText,
int cchText,
LPRECT lprc,
UINT format
Expand Down Expand Up @@ -494,12 +493,13 @@ int WINAPI TranslucentFlyoutsLib::MyDrawTextW(
return nResult;
Default:
nResult =
DrawTextWHook.OldFunction<decltype(MyDrawTextW)>(
DrawTextExWHook.OldFunction<decltype(MyDrawTextExW)>(
hdc,
lpchText,
(LPWSTR)lpchText,
cchText,
lprc,
format
format,
nullptr
);
return nResult;
}
Expand All @@ -523,7 +523,8 @@ int WINAPI TranslucentFlyoutsLib::MyDrawTextExW(
lpdtp or
!(GetCurrentFlyoutPolicy() != Null) or
VerifyCaller(TEXT("Uxtheme")) or
VerifyCaller(TEXT("MToolExtend"))
VerifyCaller(TEXT("MToolExtend")) or
VerifyCaller(g_hModule)
)
{
goto Default;
Expand Down
2 changes: 1 addition & 1 deletion TranslucentFlyouts/Win32HookHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace TranslucentFlyoutsLib
);
extern int WINAPI MyDrawTextW(
HDC hdc,
LPCTSTR lpchText,
LPCWSTR lpchText,
int cchText,
LPRECT lprc,
UINT format
Expand Down

0 comments on commit 93734ef

Please sign in to comment.