/** * Called when the application crashes. */ void CrashCallback(void* address) { extern const unsigned int g_buildNumber; Report report; report.AttachMiniDump(); if (report.Preview()) { std::stringstream stream; stream << "Decoda (Build " << MainApp::s_buildNumber << ")"; std::string buffer = UrlEncode(stream.str()); char serverAddress[1024]; sprintf(serverAddress, "http://www.unknownworlds.com/game_scripts/report/crash.php?application=%s&address=0x%08X", buffer.c_str(), reinterpret_cast<unsigned int>(address)); report.Submit(serverAddress, NULL); } }