Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
Update dllmain.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Maplespe committed Jan 10, 2022
1 parent de4e9a7 commit ea6ebaa
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions ExplorerBgTool/dllmain.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* 文件资源管理器背景工具扩展
*
* Author: Maple
Expand Down Expand Up @@ -66,18 +66,22 @@ bool Random = true;//随机显示图片 Random pictures

#pragma endregion

extern bool InjectionEntryPoint();

BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
g_hModule = hModule;
DisableThreadLibraryCalls(hModule);
if (!g_hModule) {
g_hModule = hModule;
DisableThreadLibraryCalls(hModule);
InjectionEntryPoint();
}
return TRUE;
}

//Hook入口点 EasyHook EntryPoint
extern "C" __declspec(dllexport) bool __stdcall InjectionEntryPoint()
bool InjectionEntryPoint()
{
//初始化 Gdiplus Init GdiPlus
GdiplusStartupInput StartupInput;
Expand Down Expand Up @@ -307,4 +311,4 @@ HDC MyCreateCompatibleDC(HDC hDC)
}
}
return retDC;
}
}

0 comments on commit ea6ebaa

Please sign in to comment.