bool Modules::Exec::SendReply(int newsockfd) { storm::MessageData* sendmsg = new storm::MessageData(); sendmsg->set_command("execute.result"); sendmsg->set_payload(GetResultString()); return Module::sendMessage(sendmsg, newsockfd); }
bool Modules::Ping::SendReply(int newsockfd) { //ok, run is complete, send the result back! storm::MessageData* sendmsg = new storm::MessageData(); sendmsg->set_command("ping.result"); sendmsg->set_payload(GetResultString()); return Module::sendMessage(sendmsg, newsockfd); }
void DiD3D9ErrorCheck::CheckError(HRESULT hr) { if (hr != S_OK) { DiString desc = "Direct3D API Error:\n"; desc += GetResultString(hr); DI_ERROR(desc.c_str()); } }
LONG CImeView::OnIMEComposition(WPARAM dwCommand, LPARAM dwData) { if (Check()) { // !IME_PROP_SPECIAL_UI && IME_PROP_AT_CARET if (dwData & GCS_RESULTSTR) GetResultString(); // Result String else if (dwData & GCS_COMPSTR) GetCompString((LONG)dwData); // Composition string } return 0; }
wxDateTime SqliteResultSet::GetResultDate(int nField) { // Don't use nField-1 here since GetResultString will take care of that wxString strDate = GetResultString(nField); wxDateTime date; // First check for the 2-digit year format if (date.ParseFormat(strDate, wxT("%m/%d/%y %H:%M:%S"))) { return date; } else if (date.ParseDateTime(strDate)) { return date; } else if (date.ParseDate(strDate)) { return date; } else { return wxInvalidDateTime; } }
void CheatsManager::Update() { m_match_table->clear(); m_watch_table->clear(); m_match_table->setColumnCount(2); m_watch_table->setColumnCount(4); m_match_table->setHorizontalHeaderLabels({tr("Address"), tr("Value")}); m_watch_table->setHorizontalHeaderLabels({tr("Name"), tr("Address"), tr("Lock"), tr("Value")}); if (m_results.size() > MAX_RESULTS) { m_result_label->setText(tr("Too many matches to display (%1)").arg(m_results.size())); return; } m_result_label->setText(tr("%1 Match(es)").arg(m_results.size())); m_match_table->setRowCount(static_cast<int>(m_results.size())); if (m_results.empty()) return; m_updating = true; Core::RunAsCPUThread([this] { for (size_t i = 0; i < m_results.size(); i++) { auto* address_item = new QTableWidgetItem( QStringLiteral("%1").arg(m_results[i].address, 8, 16, QLatin1Char('0'))); auto* value_item = new QTableWidgetItem; address_item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); value_item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); value_item->setText(GetResultString(m_results[i])); address_item->setData(INDEX_ROLE, static_cast<int>(i)); value_item->setData(INDEX_ROLE, static_cast<int>(i)); m_match_table->setItem(static_cast<int>(i), 0, address_item); m_match_table->setItem(static_cast<int>(i), 1, value_item); } m_watch_table->setRowCount(static_cast<int>(m_watch.size())); for (size_t i = 0; i < m_watch.size(); i++) { auto* name_item = new QTableWidgetItem(m_watch[i].name); auto* address_item = new QTableWidgetItem( QStringLiteral("%1").arg(m_watch[i].address, 8, 16, QLatin1Char('0'))); auto* lock_item = new QTableWidgetItem; auto* value_item = new QTableWidgetItem; value_item->setText(GetResultString(m_results[i])); name_item->setData(INDEX_ROLE, static_cast<int>(i)); name_item->setData(COLUMN_ROLE, 0); address_item->setData(INDEX_ROLE, static_cast<int>(i)); address_item->setData(COLUMN_ROLE, 1); lock_item->setData(INDEX_ROLE, static_cast<int>(i)); lock_item->setData(COLUMN_ROLE, 2); value_item->setData(INDEX_ROLE, static_cast<int>(i)); value_item->setData(COLUMN_ROLE, 3); name_item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable); address_item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); lock_item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsSelectable); value_item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable); lock_item->setCheckState(m_watch[i].locked ? Qt::Checked : Qt::Unchecked); m_watch_table->setItem(static_cast<int>(i), 0, name_item); m_watch_table->setItem(static_cast<int>(i), 1, address_item); m_watch_table->setItem(static_cast<int>(i), 2, lock_item); m_watch_table->setItem(static_cast<int>(i), 3, value_item); } }); m_updating = false; }