Ok since maxtor still didnt made those sections cuz i dunno why... or he dont want to make those sections whatever
but anyways
#include <detours.h>
//Prototype of the original ShellAboutW API
int (__stdcall *ShellAboutWD_o)( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon);
//Hooked ShellAboutW API
int __stdcall ShellAboutWD(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
{
return ShellAboutWD_o(hWnd, L"DragonHunter [LeetCoders]", L"The about API/Function is hooked by DragonHunter ;D!", hIcon); //Return to original api function
}
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
HANDLE ShellAboutWDProcessAddress; //Hold the ShellAboutW API memory address
ShellAboutWDProcessAddress = GetProcAddress(
GetModuleHandle(L"Shell32"), //DLL Library
"ShellAboutW" //API/Function
);
//Since we now have the memory address of ShellAboutW we can finally start the hook process :)
if(ShellAboutWDProcessAddress != 0) //Check if memory address is found (Error-Handling)
{
ShellAboutWD_o = ( //Set the original API/Function
int (__stdcall *)( //Prototype
HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)) //Prototype
DetourFunction( //Api-Hook ShellAboutW
(PBYTE)ShellAboutWDProcessAddress, //Get memory address
(PBYTE)ShellAboutWD); //Set ShellAboutWD_o -> ShellAboutWD
}
break;
case DLL_PROCESS_DETACH:
if(ShellAboutWDProcessAddress != 0)
{
DetourRemove(
(PBYTE)ShellAboutWDProcessAddress, //Unhook the API/Function
(PBYTE)ShellAboutWD);
}
break;
}
return TRUE;
}
And this is the output
Have fun...
Coded by DragonHunter