#ifdef FINAL_BUILD int value1 = getRand();
int value2 = getRand();
int value3 = getRand();
TCHAR *pEnd = NULL;
TCHAR szFullFileName[MAX_PATH] = { 0, };
TCHAR szMsg[255];
int nRet;
g_dwMainThreadID = GetCurrentThreadId();
LoadString(hInstance, 103, szTitle, 500);
GetModuleFileName(NULL, szFullFileName, MAX_PATH);
pEnd = _tcsrchr( szFullFileName, _T('\\')) + 1;
if (!pEnd)
{
return FALSE;
}
*pEnd = _T('\0');
_stprintf(g_szIniPath, _T("%s"), szFullFileName);
_stprintf(g_szHShieldPath, _T("%s\\HackShield"), szFullFileName);
_tcscat(szFullFileName, _T("HackShield\\EhSvc.dll"));
_tcscat(g_szIniPath, _T("MiniAEnv.INI"));
AHNHS_EXT_ERRORINFO HsExtError;
sprintf( HsExtError.szServer, "%s", "192.95.4.16" );
sprintf( HsExtError.szUserId, "%s", "GameUser" );
sprintf( HsExtError.szGameVersion, "%s", "1.0.0.1" );
DWORD dwResult ;
/*dwResult = _AhnHS_HSUpdate(g_szHShieldPath, 1000 * 600);
if (dwResult != 0)
{
_stprintf(szMsg, _T("HackShield Update Failed. Folder HShield or HSUpdate.exe is missing from your computer(Error Code = %d)."), dwResult);
MessageBox(NULL, szMsg, szTitle, MB_OK);
return FALSE;
}*/
/*if (WG_StopInject1() != 487587)
TerminateProcess(GetCurrentProcess(),-1);*/
dwResult = _AhnHS_HSUpdateEx(g_szHShieldPath, 1000 * 600,1000 ,AHNHSUPDATE_CHKOPT_HOSTFILE| AHNHSUPDATE_CHKOPT_GAMECODE, HsExtError, 1000* 20 );
nRet = _AhnHS_StartMonitor(HsExtError,g_szHShieldPath);
//r3dOutToLog("_AhnHS_StartMonitor\n");
if (nRet != HS_ERR_OK && nRet != 257 && nRet != 12159)
{
_stprintf(szMsg, _T("HackShield Load Error. Folder HShield is missing from your computer(Error Code = %d)."), nRet);
MessageBox(NULL, szMsg, szTitle, MB_OK);
return FALSE;
}
extern int __stdcall AhnHS_Callback(long lCode, long lParamSize, void* pParam);
nRet = _AhnHS_Initialize(szFullFileName, AhnHS_Callback,
1000, "B228F2916A48AC24",
AHNHS_CHKOPT_ALL|AHNHS_DISPLAY_HACKSHIELD_TRAYICON|AHNHS_CHKOPT_LOADLIBRARY|AHNHS_CHKOPT_PROTECT_D3DX|AHNHS_CHKOPT_LOCAL_MEMORY_PROTECTION,
AHNHS_SPEEDHACK_SENSING_RATIO_HIGHEST);
if (nRet != HS_ERR_OK && nRet != 257 && nRet != 12159)
{
_stprintf(szMsg, _T("HackShield Initialize Error. Folder HShield is missing from your computer(Error Code = %d)."), nRet);
MessageBox(NULL, szMsg, szTitle, MB_OK);
return FALSE;
}
DWORD version;
nRet = _AhnHS_GetSDKVersion(&version);
if (nRet != HS_ERR_OK)
{
_stprintf(szMsg, _T("HackShield Api Error. (Error Code = %d)."), nRet);
MessageBox(NULL, szMsg, szTitle, MB_OK);
}
else
{
//_stprintf(szMsg, _T("HackShield SDK Version %d."), version);
if (version != 1446617492)
{
_stprintf(szMsg, _T("HackShield Load Failed. Wrong Version."));
MessageBox(NULL, szMsg, szTitle, MB_OK);
return FALSE;
}
}
nRet = _AhnHS_StartService();
assert(nRet != HS_ERR_NOT_INITIALIZED);
assert(nRet != HS_ERR_ALREADY_SERVICE_RUNNING);
//r3dOutToLog("_AhnHS_StartService\n");
if (nRet != HS_ERR_OK && nRet != 257 && nRet != 12159)
{
_stprintf(szMsg, _T("HackShield Start Error. Folder HShield is missing from your computer(Error Code = %d)."), nRet);
MessageBox(NULL, szMsg, szTitle, MB_OK);
return FALSE;
}
antihackNotFound = 0;
#endif