* @brief DetailedAlertWindow::UpdateDisplayAlert - Update the window to display alert details based on AlertInfo. * @param AlertInfo - The new alert to display. */
| 42 | * @param AlertInfo - The new alert to display. |
| 43 | */ |
| 44 | void DetailedAlertWindow::UpdateDisplayAlert(PBASE_ALERT_INFO AlertInfo) |
| 45 | { |
| 46 | QString alertName; |
| 47 | QString alertSource; |
| 48 | PSTACK_VIOLATION_ALERT stackViolationAlert; |
| 49 | PFILTER_VIOLATION_ALERT filterViolationAlert; |
| 50 | PREMOTE_OPERATION_ALERT remoteOperationAlert; |
| 51 | ULONG i; |
| 52 | QString violatingAddress; |
| 53 | |
| 54 | STACK_RETURN_INFO* stackHistory; |
| 55 | ULONG stackHistorySize; |
| 56 | CHAR tempBuffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME]; |
| 57 | PSYMBOL_INFO currentSymbolInformation; |
| 58 | ULONG64 offset; |
| 59 | QString stackHistoryString; |
| 60 | QString tooltip; |
| 61 | QTableWidgetItem* newWidget; |
| 62 | bool stackHistoryViolation; |
| 63 | |
| 64 | memset(tempBuffer, 0, sizeof(tempBuffer)); |
| 65 | currentSymbolInformation = RCAST<PSYMBOL_INFO>(tempBuffer); |
| 66 | currentSymbolInformation->SizeOfStruct = sizeof(SYMBOL_INFO); |
| 67 | currentSymbolInformation->MaxNameLen = MAX_SYM_NAME; |
| 68 | |
| 69 | this->ui->AlertDetailsTable->setColumnCount(2); |
| 70 | this->ui->AlertDetailsTable->setRowCount(6); |
| 71 | InitializeCommonTable(this->ui->AlertDetailsTable); |
| 72 | |
| 73 | // |
| 74 | // Fill out basic fields. |
| 75 | // |
| 76 | this->ui->AlertDetailsTable->setItem(0, 0, new QTableWidgetItem("Name")); |
| 77 | |
| 78 | this->ui->AlertDetailsTable->setItem(1, 0, new QTableWidgetItem("Source")); |
| 79 | |
| 80 | this->ui->AlertDetailsTable->setItem(2, 0, new QTableWidgetItem("Source Id")); |
| 81 | this->ui->AlertDetailsTable->setItem(2, 1, new QTableWidgetItem(QString::number(RCAST<ULONG64>(AlertInfo->SourceId)))); |
| 82 | |
| 83 | this->ui->AlertDetailsTable->setItem(3, 0, new QTableWidgetItem("Source Path")); |
| 84 | newWidget = new QTableWidgetItem(QString::fromWCharArray(AlertInfo->SourcePath)); |
| 85 | newWidget->setToolTip(QString::fromWCharArray(AlertInfo->SourcePath)); |
| 86 | this->ui->AlertDetailsTable->setItem(3, 1, newWidget); |
| 87 | |
| 88 | this->ui->AlertDetailsTable->setItem(4, 0, new QTableWidgetItem("Target Path")); |
| 89 | newWidget = new QTableWidgetItem(QString::fromWCharArray(AlertInfo->TargetPath)); |
| 90 | newWidget->setToolTip(QString::fromWCharArray(AlertInfo->TargetPath)); |
| 91 | this->ui->AlertDetailsTable->setItem(4, 1, newWidget); |
| 92 | |
| 93 | // |
| 94 | // Get the name of the source. |
| 95 | // |
| 96 | switch(AlertInfo->AlertSource) |
| 97 | { |
| 98 | case ProcessCreate: |
| 99 | alertSource = "Process Creation"; |
| 100 | break; |
| 101 | case ImageLoad: |
no outgoing calls
no test coverage detected