| 761 | } |
| 762 | |
| 763 | void MainGui::loadTreeActionHandler() |
| 764 | { |
| 765 | if(!selectedProcess) |
| 766 | return; |
| 767 | |
| 768 | WCHAR selectedFilePath[MAX_PATH]; |
| 769 | getCurrentModulePath(stringBuffer, _countof(stringBuffer)); |
| 770 | if(showFileDialog(selectedFilePath, false, NULL, filterXml, NULL, stringBuffer)) |
| 771 | { |
| 772 | TreeImportExport treeIO(selectedFilePath); |
| 773 | DWORD_PTR addrOEP = 0; |
| 774 | DWORD_PTR addrIAT = 0; |
| 775 | DWORD sizeIAT = 0; |
| 776 | |
| 777 | if(!treeIO.importTreeList(importsHandling.moduleList, &addrOEP, &addrIAT, &sizeIAT)) |
| 778 | { |
| 779 | Scylla::windowLog.log(L"Loading tree file failed %s", selectedFilePath); |
| 780 | MessageBox(L"Loading tree file failed.", L"Failure", MB_ICONERROR); |
| 781 | } |
| 782 | else |
| 783 | { |
| 784 | EditOEPAddress.SetValue(addrOEP); |
| 785 | EditIATAddress.SetValue(addrIAT); |
| 786 | EditIATSize.SetValue(sizeIAT); |
| 787 | |
| 788 | importsHandling.displayAllImports(); |
| 789 | updateStatusBar(); |
| 790 | |
| 791 | Scylla::windowLog.log(L"Loaded tree file %s", selectedFilePath); |
| 792 | Scylla::windowLog.log(L"-> OEP: " PRINTF_DWORD_PTR_FULL, addrOEP); |
| 793 | Scylla::windowLog.log(L"-> IAT: " PRINTF_DWORD_PTR_FULL L" Size: " PRINTF_DWORD_PTR, addrIAT, sizeIAT); |
| 794 | } |
| 795 | } |
| 796 | } |
| 797 | |
| 798 | void MainGui::saveTreeActionHandler() |
| 799 | { |
nothing calls this directly
no test coverage detected