Heres how to bypass a screenshot in any game. It will create a clean screenshot like you were never hacking.
Code:
////make apihook.h//////
#include <windows.h>
#include <detours.h>
#include "d3d9dev.h"
#pragma comment(lib,"detours.lib")
#pragma comment(lib,"psapi.lib")
/*
//////////////////////////////////////////////////////////////
////////////////DONT FORGET TO CREDIT TERRENCE111///////////////////
////////////////IF YOU USE THIS///////////////////////////////
//////////////////////////////////////////////////////////////
*/
DETOUR_TRAMPOLINE(BOOL WINAPI fGetWindowPlacement(HWND hWnd,WINDOWPLACEMENT *lpwndpl),GetWindowPlacement);
BOOL WINAPI Fake_GetWindowPlacemt(HWND hWnd,WINDOWPLACEMENT *lpwndpl)
{
BOOL GWP;
GWP = fGetWindowPlacement(hWnd,lpwndpl);
if (lpwndpl->showCmd && SW_SHOWMAXIMIZED)
{
lpwndpl->showCmd = SW_SHOWMINIMIZED;
}
return GWP;
}
////end of apihook.h//////////////////
in main.h add this:
Code:
#include "apihook.h"
///in Dllmain///
DetourFunctionWithTrampoline((PBYTE)fGetWindowPlacement, (PBYTE)Fake_GetWindowPlacemt);
And if you need to remove it when pb is checking heres the detour remove method...
Code:
DetourRemove((PBYTE)fGetWindowPlacement, (PBYTE)Fake_GetWindowPlacemt);
This will generate a clean screen shot not a blank one so it doesn't look like you were hacking at all.