From fa264dd07971115454952d1751dfdfee74e3ed88 Mon Sep 17 00:00:00 2001 From: marcussacana Date: Fri, 2 Aug 2019 14:23:29 -0300 Subject: [PATCH] Fix CreateFont Hook --- SRL/Hook/TextHook.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/SRL/Hook/TextHook.cs b/SRL/Hook/TextHook.cs index 8bfd3e5..c7da932 100644 --- a/SRL/Hook/TextHook.cs +++ b/SRL/Hook/TextHook.cs @@ -32,8 +32,8 @@ static partial class StringReloader { static UnmanagedHook hTextOutW; static UnmanagedHook hExtTextOutA; static UnmanagedHook hExtTextOutW; - static UnmanagedHook hCreatFontA; - static UnmanagedHook hCreatFontW; + static UnmanagedHook hCreateFontA; + static UnmanagedHook hCreateFontW; static UnmanagedHook hCreatFontIndirectA; static UnmanagedHook hCreatFontIndirectW; #if DEBUG @@ -102,11 +102,11 @@ static void InstallCreateFontHooks() dCreateFontA = new CreateFontADelegate(hCreateFont); dCreateFontW = new CreateFontWDelegate(hCreateFont); - hCreatFontA = AutoHookCreator("gdi32.dll", "CreateFontA", dCreateFontA); - hCreatFontW = AutoHookCreator("gdi32.dll", "CreateFontW", dCreateFontW); + hCreateFontA = AutoHookCreator("gdi32.dll", "CreateFontA", dCreateFontA); + hCreateFontW = AutoHookCreator("gdi32.dll", "CreateFontW", dCreateFontW); - hCreatFontA.Install(); - hCreatFontW.Install(); + hCreateFontA.Install(); + hCreateFontW.Install(); } static void InstallCreateFontIndirectHooks() @@ -311,12 +311,12 @@ static IntPtr hCreateFont(int nHeight, int nWidth, int nEscapement, int nOrienta if (LogInput) Log("CreateFont Hooked, {0} 0x{1:X2}", true, lpszFace, fdwCharSet); - if (hCreateFileW.ImportHook) + if (hCreateFontW.ImportHook) return CreateFontW(nHeight, nWidth, nEscapement, nOrientation, fnWeight, fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality, fdwPitchAndFamily, lpszFace); - hCreatFontW.Uninstall(); + hCreateFontW.Uninstall(); var Result = CreateFontW(nHeight, nWidth, nEscapement, nOrientation, fnWeight, fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality, fdwPitchAndFamily, lpszFace); - hCreatFontW.Install(); + hCreateFontW.Install(); return Result; }