Page Menu
Home
desp's stash
Search
Configure Global Search
Log In
Files
F213119
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Subscribers
None
View Options
diff --git a/Scylla/PickDllGui.cpp b/Scylla/PickDllGui.cpp
index f5905ed..90ae707 100644
--- a/Scylla/PickDllGui.cpp
+++ b/Scylla/PickDllGui.cpp
@@ -1,113 +1,111 @@
#include "PickDllGui.h"
#include "WindowDeferrer.h"
PickDllGui::PickDllGui(std::vector<ModuleInfo> &moduleList) : moduleList(moduleList)
{
selectedModule = 0;
hIcon.LoadIcon(IDI_ICON_SCYLLA);
}
BOOL PickDllGui::OnInitDialog(CWindow wndFocus, LPARAM lInitParam)
{
ListDLLSelect.Attach(GetDlgItem(IDC_LIST_DLLSELECT));
addColumnsToModuleList(ListDLLSelect);
displayModuleList(ListDLLSelect);
CenterWindow();
- if(hIcon)
- {
- SetIcon(hIcon, TRUE);
- SetIcon(hIcon, FALSE);
- }
+ SetIcon(hIcon, TRUE);
+ SetIcon(hIcon, FALSE);
GetWindowRect(&MinSize);
return TRUE;
}
void PickDllGui::OnGetMinMaxInfo(MINMAXINFO* lpMMI)
{
lpMMI->ptMinTrackSize.x = MinSize.right - MinSize.left;
lpMMI->ptMinTrackSize.y = MinSize.bottom - MinSize.top;
}
void PickDllGui::OnSizing(UINT fwSide, RECT* pRect)
{
int toResize[] = {IDC_LIST_DLLSELECT};
int toMove[] = {IDC_BTN_PICKDLL_OK, IDC_BTN_PICKDLL_CANCEL};
WindowDeferrer::Deferrable controls[] =
{
{IDC_LIST_DLLSELECT, false, false, true, true},
{IDC_BTN_PICKDLL_OK, true, true, false, false},
{IDC_BTN_PICKDLL_CANCEL, true, true, false, false},
};
// Get size difference
RECT rectOld;
GetWindowRect(&rectOld);
long deltaX = (pRect->right - pRect->left) - (rectOld.right - rectOld.left);
long deltaY = (pRect->bottom - pRect->top) - (rectOld.bottom - rectOld.top);
WindowDeferrer deferrer(m_hWnd, controls, _countof(controls));
deferrer.defer(deltaX, deltaY);
}
void PickDllGui::OnOK(UINT uNotifyCode, int nID, CWindow wndCtl)
{
int index = ListDLLSelect.GetSelectionMark();
if (index != -1)
{
selectedModule = &moduleList[index];
EndDialog(1);
}
}
void PickDllGui::OnCancel(UINT uNotifyCode, int nID, CWindow wndCtl)
{
EndDialog(0);
}
void PickDllGui::addColumnsToModuleList(CListViewCtrl& list)
{
list.SetExtendedListViewStyle(LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT);
- list.InsertColumn(COL_PATH, L"Path", LVCFMT_LEFT, 210);
- list.InsertColumn(COL_NAME, L"Name", LVCFMT_CENTER, 130);
- list.InsertColumn(COL_IMAGEBASE, L"ImageBase", LVCFMT_CENTER, 70);
- list.InsertColumn(COL_IMAGESIZE, L"ImageSize", LVCFMT_CENTER, 70);
+ list.InsertColumn(COL_NAME, L"Name", LVCFMT_LEFT);
+ list.InsertColumn(COL_IMAGEBASE, L"ImageBase", LVCFMT_CENTER);
+ list.InsertColumn(COL_IMAGESIZE, L"ImageSize", LVCFMT_CENTER);
+ list.InsertColumn(COL_PATH, L"Path", LVCFMT_LEFT);
}
void PickDllGui::displayModuleList(CListViewCtrl& list)
{
WCHAR temp[20];
list.DeleteAllItems();
std::vector<ModuleInfo>::const_iterator iter;
int count = 0;
for( iter = moduleList.begin(); iter != moduleList.end(); iter++ , count++)
{
- list.InsertItem(count, iter->fullPath);
-
- list.SetItemText(count, COL_NAME, iter->getFilename());
+ list.InsertItem(count, iter->getFilename());
- swprintf_s(temp,_countof(temp),L"%08X",iter->modBaseAddr);
+#ifdef _WIN64
+ swprintf_s(temp, _countof(temp), L"%016I64X", iter->modBaseAddr);
+#else
+ swprintf_s(temp, _countof(temp), L"%08X", iter->modBaseAddr);
+#endif
list.SetItemText(count, COL_IMAGEBASE, temp);
- swprintf_s(temp,_countof(temp),L"%08X",iter->modBaseSize);
+ swprintf_s(temp, _countof(temp),L"%08X",iter->modBaseSize);
list.SetItemText(count, COL_IMAGESIZE, temp);
- }
- //list.SetColumnWidth(COL_PATH, LVSCW_AUTOSIZE);
- list.SetColumnWidth(COL_NAME, LVSCW_AUTOSIZE);
- //list.SetColumnWidth(COL_IMAGEBASE, LVSCW_AUTOSIZE);
+ list.SetItemText(count, COL_PATH, iter->fullPath);
+ }
+ list.SetColumnWidth(COL_NAME, LVSCW_AUTOSIZE_USEHEADER);
+ list.SetColumnWidth(COL_IMAGEBASE, LVSCW_AUTOSIZE_USEHEADER);
list.SetColumnWidth(COL_IMAGESIZE, LVSCW_AUTOSIZE_USEHEADER);
-
- //m_hotkeysListView.SetColumnWidth(1, LVSCW_AUTOSIZE_USEHEADER);
+ list.SetColumnWidth(COL_PATH, LVSCW_AUTOSIZE_USEHEADER);
}
diff --git a/Scylla/PickDllGui.h b/Scylla/PickDllGui.h
index 56d0a53..7a01524 100644
--- a/Scylla/PickDllGui.h
+++ b/Scylla/PickDllGui.h
@@ -1,74 +1,74 @@
#pragma once
#include <windows.h>
#include "resource.h"
// WTL
#include <atlbase.h> // base ATL classes
#include <atlapp.h> // base WTL classes
#include <atlwin.h> // ATL GUI classes
#include <atlmisc.h> // WTL utility classes like CString
#include <atlcrack.h> // WTL enhanced msg map macros
#include <atlctrls.h> // WTL controls
#include <vector>
#include "ProcessAccessHelp.h"
class PickDllGui : public CDialogImpl<PickDllGui>
{
public:
enum { IDD = IDD_DLG_PICKDLL };
BEGIN_MSG_MAP(PickDllGui)
MSG_WM_INITDIALOG(OnInitDialog)
MSG_WM_GETMINMAXINFO(OnGetMinMaxInfo)
MSG_WM_SIZING(OnSizing)
COMMAND_ID_HANDLER_EX(IDC_BTN_PICKDLL_OK, OnOK)
COMMAND_ID_HANDLER_EX(IDC_BTN_PICKDLL_CANCEL, OnCancel)
COMMAND_ID_HANDLER_EX(IDCANCEL, OnCancel)
END_MSG_MAP()
PickDllGui(std::vector<ModuleInfo> &moduleList);
ModuleInfo* getSelectedModule() const { return selectedModule; }
protected:
// Variables
std::vector<ModuleInfo> &moduleList;
ModuleInfo* selectedModule;
// Controls
CListViewCtrl ListDLLSelect;
enum ListColumns {
- COL_PATH,
COL_NAME,
COL_IMAGEBASE,
- COL_IMAGESIZE
+ COL_IMAGESIZE,
+ COL_PATH
};
RECT MinSize;
// Handles
CIcon hIcon;
protected:
// Message handlers
BOOL OnInitDialog(CWindow wndFocus, LPARAM lInitParam);
void OnGetMinMaxInfo(MINMAXINFO* lpMMI);
void OnSizing(UINT fwSide, RECT* pRect);
void OnOK(UINT uNotifyCode, int nID, CWindow wndCtl);
void OnCancel(UINT uNotifyCode, int nID, CWindow wndCtl);
// GUI functions
void addColumnsToModuleList(CListViewCtrl& list);
void displayModuleList(CListViewCtrl& list);
};
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Jan 7, 12:30 AM (2 h, 41 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
8f/24/063677766ab8833cbe49bbdafb7a
Attached To
rSCY Scylla
Event Timeline
Log In to Comment