Intra in
UserInterface.cpp si deasupra la codul acesta
Cod: Selectaţi tot
bool Main(HINSTANCE hInstance, LPSTR lpCmdLine)
{
#ifdef LOCALE_SERVICE_YMIR
extern bool g_isScreenShotKey;
g_isScreenShotKey = true;
#endif
DWORD dwRandSeed=time(NULL)+DWORD(GetCurrentProcess());
srandom(dwRandSeed);
srand(random());
SetLogLevel(1);
#ifdef LOCALE_SERVICE_VIETNAM_MILD
extern BOOL USE_VIETNAM_CONVERT_WEAPON_VNUM;
USE_VIETNAM_CONVERT_WEAPON_VNUM = true;
#endif
if (_access("perf_game_update.txt", 0)==0)
{
DeleteFile("perf_game_update.txt");
}
if (_access("newpatch.exe", 0)==0)
{
system("patchupdater.exe");
return false;
}
#ifndef __VTUNE__
ilInit();
#endif
if (!Setup(lpCmdLine))
return false;
#ifdef _DEBUG
OpenConsoleWindow();
OpenLogFile(true); // true == uses syserr.txt and log.txt
#else
OpenLogFile(false); // false == uses syserr.txt only
#endif
static CLZO lzo;
static CEterPackManager EterPackManager;
if (!PackInitialize("pack"))
{
LogBox("Pack Initialization failed. Check log.txt file..");
return false;
}
if(LocaleService_LoadGlobal(hInstance))
SetDefaultCodePage(LocaleService_GetCodePage());
CPythonApplication * app = new CPythonApplication;
app->Initialize(hInstance);
bool ret=false;
{
CPythonLauncher pyLauncher;
CPythonExceptionSender pyExceptionSender;
SetExceptionSender(&pyExceptionSender);
if (pyLauncher.Create())
{
ret=RunMainScript(pyLauncher, lpCmdLine); //°ÔÀÓ ½ÇÇàÁß¿£ ÇÔ¼ö°¡ ³¡³ªÁö ¾Ê´Â´Ù.
}
//ProcessScanner_ReleaseQuitEvent();
//°ÔÀÓ Á¾·á½Ã.
app->Clear();
timeEndPeriod(1);
pyLauncher.Clear();
}
app->Destroy();
delete app;
return ret;
}
Adauga asta :
Cod: Selectaţi tot
void SetInternetRegKey()
{
LONG status;
HKEY hKey;
status = RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION"), 0, KEY_ALL_ACCESS, &hKey);
if ((status == ERROR_SUCCESS) && (hKey != NULL))
{
DWORD standard = 11000;
DWORD version;
DWORD size = sizeof(version);
DWORD type = REG_DWORD;
status = RegQueryValueEx(hKey, TEXT("YOURCLIENTEXECUTABLEFILE.EXTENSION"), NULL, &type, (BYTE*)&version, &size);
if (status != ERROR_SUCCESS)
{
status = RegSetValueEx(hKey, TEXT("YOURCLIENTEXECUTABLEFILE.EXTENSION"), NULL, REG_DWORD, (BYTE*)&standard, sizeof(standard));
if (status != ERROR_SUCCESS)
{
}
}
RegCloseKey(hKey);
}
}
Iar sub
Cod: Selectaţi tot
bool Main(HINSTANCE hInstance, LPSTR lpCmdLine)
{
Adauga asta :
Ar trebui sa rate asa
