Add manual refresh option and configuration files to describe interfaces
This commit is contained in:
parent
940bff0824
commit
e71a2006b7
|
@ -4,7 +4,7 @@ project(RpcView)
|
||||||
|
|
||||||
set(RPCVIEW_VERSION_MAJOR 0)
|
set(RPCVIEW_VERSION_MAJOR 0)
|
||||||
set(RPCVIEW_VERSION_MINOR 3)
|
set(RPCVIEW_VERSION_MINOR 3)
|
||||||
set(RPCVIEW_VERSION_RELEASE 0)
|
set(RPCVIEW_VERSION_RELEASE 1)
|
||||||
if($ENV{APPVEYOR_BUILD_NUMBER})
|
if($ENV{APPVEYOR_BUILD_NUMBER})
|
||||||
set(RPCVIEW_VERSION_BUILD $ENV{APPVEYOR_BUILD_NUMBER})
|
set(RPCVIEW_VERSION_BUILD $ENV{APPVEYOR_BUILD_NUMBER})
|
||||||
else()
|
else()
|
||||||
|
|
|
@ -8,6 +8,10 @@
|
||||||
#include "../RpcCommon/Misc.h"
|
#include "../RpcCommon/Misc.h"
|
||||||
#include "Pdb.h"
|
#include "Pdb.h"
|
||||||
#include <Dbghelp.h>
|
#include <Dbghelp.h>
|
||||||
|
#include <strsafe.h>
|
||||||
|
|
||||||
|
static WCHAR FullPath[MAX_PATH];
|
||||||
|
static RPC_WSTR pUuidString = NULL;
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
InterfaceSelectedVisitor_C::InterfaceSelectedVisitor_C(quint32 Pid, RPC_IF_ID* pIf,RpcCore_T* pRpcCore,void* pRpcCoreCtxt)
|
InterfaceSelectedVisitor_C::InterfaceSelectedVisitor_C(quint32 Pid, RPC_IF_ID* pIf,RpcCore_T* pRpcCore,void* pRpcCoreCtxt)
|
||||||
|
@ -18,12 +22,15 @@ InterfaceSelectedVisitor_C::InterfaceSelectedVisitor_C(quint32 Pid, RPC_IF_ID* p
|
||||||
this->pRpcCoreCtxt = pRpcCoreCtxt;
|
this->pRpcCoreCtxt = pRpcCoreCtxt;
|
||||||
|
|
||||||
this->pRpcInterfaceInfo = pRpcCore->RpcCoreGetInterfaceInfoFn( pRpcCoreCtxt, Pid, pIf, RPC_INTERFACE_INFO_ALL );
|
this->pRpcInterfaceInfo = pRpcCore->RpcCoreGetInterfaceInfoFn( pRpcCoreCtxt, Pid, pIf, RPC_INTERFACE_INFO_ALL );
|
||||||
|
UuidToStringW(&pIf->Uuid, &pUuidString);
|
||||||
|
GetFullPathNameW(L"RpcView.ini", _countof(FullPath), FullPath, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
InterfaceSelectedVisitor_C::~InterfaceSelectedVisitor_C()
|
InterfaceSelectedVisitor_C::~InterfaceSelectedVisitor_C()
|
||||||
{
|
{
|
||||||
|
RpcStringFreeW(&pUuidString);
|
||||||
if (pRpcInterfaceInfo != NULL)
|
if (pRpcInterfaceInfo != NULL)
|
||||||
{
|
{
|
||||||
pRpcCore->RpcCoreFreeInterfaceInfoFn(pRpcCoreCtxt, pRpcInterfaceInfo);
|
pRpcCore->RpcCoreFreeInterfaceInfoFn(pRpcCoreCtxt, pRpcInterfaceInfo);
|
||||||
|
@ -146,6 +153,12 @@ void InterfaceSelectedVisitor_C::Visit(ProceduresWidget_C* pProceduresWidget)
|
||||||
{
|
{
|
||||||
PdbGetSymbolName(hPdb, (UCHAR*)pRpcInterfaceInfo->pLocationBase + pRpcInterfaceInfo->ppProcAddressTable[ProcIdx], SymbolName, sizeof(SymbolName));
|
PdbGetSymbolName(hPdb, (UCHAR*)pRpcInterfaceInfo->pLocationBase + pRpcInterfaceInfo->ppProcAddressTable[ProcIdx], SymbolName, sizeof(SymbolName));
|
||||||
}
|
}
|
||||||
|
if (SymbolName[0] == 0) {
|
||||||
|
WCHAR ProcIdxName[10];
|
||||||
|
|
||||||
|
StringCbPrintfW(ProcIdxName, sizeof(ProcIdxName), L"Proc%u", ProcIdx);
|
||||||
|
GetPrivateProfileStringW((LPCWSTR)pUuidString, ProcIdxName, NULL, SymbolName, sizeof(SymbolName)/sizeof(SymbolName[0]), FullPath);
|
||||||
|
}
|
||||||
if ( (pRpcInterfaceInfo->pFormatStringOffsetTable==NULL)||
|
if ( (pRpcInterfaceInfo->pFormatStringOffsetTable==NULL)||
|
||||||
(pRpcInterfaceInfo->pProcFormatString==NULL))
|
(pRpcInterfaceInfo->pProcFormatString==NULL))
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#define BELOW_NORMAL_REFRESH_SPEED 2000
|
#define BELOW_NORMAL_REFRESH_SPEED 2000
|
||||||
#define SLOW_REFRESH_SPEED 5000
|
#define SLOW_REFRESH_SPEED 5000
|
||||||
#define VERY_SLOW_REFRESH_SPEED 10000
|
#define VERY_SLOW_REFRESH_SPEED 10000
|
||||||
|
#define MANUAL_REFRESH_SPEED 0
|
||||||
#define SHELL_EXECUTE_SUCCESS ((HINSTANCE)42) // According to the doc, welcome the 16-bit compatibilty
|
#define SHELL_EXECUTE_SUCCESS ((HINSTANCE)42) // According to the doc, welcome the 16-bit compatibilty
|
||||||
|
|
||||||
|
|
||||||
|
@ -458,6 +459,7 @@ void MainWindow_C::ConfigureSymbols()
|
||||||
void MainWindow_C::SetUpdateSpeedAsFast()
|
void MainWindow_C::SetUpdateSpeedAsFast()
|
||||||
{
|
{
|
||||||
this->RefreshSpeedInMs = FAST_REFRESH_SPEED;
|
this->RefreshSpeedInMs = FAST_REFRESH_SPEED;
|
||||||
|
pRefreshTimer->start();
|
||||||
pRefreshTimer->setInterval(this->RefreshSpeedInMs);
|
pRefreshTimer->setInterval(this->RefreshSpeedInMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -466,6 +468,7 @@ void MainWindow_C::SetUpdateSpeedAsFast()
|
||||||
void MainWindow_C::SetUpdateSpeedAsNormal()
|
void MainWindow_C::SetUpdateSpeedAsNormal()
|
||||||
{
|
{
|
||||||
this->RefreshSpeedInMs = NORMAL_REFRESH_SPEED;
|
this->RefreshSpeedInMs = NORMAL_REFRESH_SPEED;
|
||||||
|
pRefreshTimer->start();
|
||||||
pRefreshTimer->setInterval(this->RefreshSpeedInMs);
|
pRefreshTimer->setInterval(this->RefreshSpeedInMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -474,6 +477,7 @@ void MainWindow_C::SetUpdateSpeedAsNormal()
|
||||||
void MainWindow_C::SetUpdateSpeedAsBelowNormal()
|
void MainWindow_C::SetUpdateSpeedAsBelowNormal()
|
||||||
{
|
{
|
||||||
this->RefreshSpeedInMs = BELOW_NORMAL_REFRESH_SPEED;
|
this->RefreshSpeedInMs = BELOW_NORMAL_REFRESH_SPEED;
|
||||||
|
pRefreshTimer->start();
|
||||||
pRefreshTimer->setInterval(this->RefreshSpeedInMs);
|
pRefreshTimer->setInterval(this->RefreshSpeedInMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -482,6 +486,7 @@ void MainWindow_C::SetUpdateSpeedAsBelowNormal()
|
||||||
void MainWindow_C::SetUpdateSpeedAsSlow()
|
void MainWindow_C::SetUpdateSpeedAsSlow()
|
||||||
{
|
{
|
||||||
this->RefreshSpeedInMs = SLOW_REFRESH_SPEED;
|
this->RefreshSpeedInMs = SLOW_REFRESH_SPEED;
|
||||||
|
pRefreshTimer->start();
|
||||||
pRefreshTimer->setInterval(this->RefreshSpeedInMs);
|
pRefreshTimer->setInterval(this->RefreshSpeedInMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -490,9 +495,17 @@ void MainWindow_C::SetUpdateSpeedAsSlow()
|
||||||
void MainWindow_C::SetUpdateSpeedAsVerySlow()
|
void MainWindow_C::SetUpdateSpeedAsVerySlow()
|
||||||
{
|
{
|
||||||
this->RefreshSpeedInMs = VERY_SLOW_REFRESH_SPEED;
|
this->RefreshSpeedInMs = VERY_SLOW_REFRESH_SPEED;
|
||||||
|
pRefreshTimer->start();
|
||||||
pRefreshTimer->setInterval(this->RefreshSpeedInMs);
|
pRefreshTimer->setInterval(this->RefreshSpeedInMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
void MainWindow_C::SetUpdateSpeedAsManual()
|
||||||
|
{
|
||||||
|
this->RefreshSpeedInMs = MANUAL_REFRESH_SPEED;
|
||||||
|
pRefreshTimer->stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
void MainWindow_C::InvokeFindShortcut()
|
void MainWindow_C::InvokeFindShortcut()
|
||||||
|
@ -583,12 +596,14 @@ void MainWindow_C::SetupMenu()
|
||||||
pActionSpeedBelowNormal = pSubMenupdateSpeed->addAction("2 seconds", this, SLOT(SetUpdateSpeedAsBelowNormal()));
|
pActionSpeedBelowNormal = pSubMenupdateSpeed->addAction("2 seconds", this, SLOT(SetUpdateSpeedAsBelowNormal()));
|
||||||
pActionSpeedSlow = pSubMenupdateSpeed->addAction("5 seconds", this, SLOT(SetUpdateSpeedAsSlow()));
|
pActionSpeedSlow = pSubMenupdateSpeed->addAction("5 seconds", this, SLOT(SetUpdateSpeedAsSlow()));
|
||||||
pActionSpeedVerySlow = pSubMenupdateSpeed->addAction("10 seconds", this, SLOT(SetUpdateSpeedAsVerySlow()));
|
pActionSpeedVerySlow = pSubMenupdateSpeed->addAction("10 seconds", this, SLOT(SetUpdateSpeedAsVerySlow()));
|
||||||
|
pActionSpeedManual = pSubMenupdateSpeed->addAction("manual", this, SLOT(SetUpdateSpeedAsManual()));
|
||||||
|
|
||||||
pActionSpeedFast->setCheckable(true);
|
pActionSpeedFast->setCheckable(true);
|
||||||
pActionSpeedNormal->setCheckable(true);
|
pActionSpeedNormal->setCheckable(true);
|
||||||
pActionSpeedBelowNormal->setCheckable(true);
|
pActionSpeedBelowNormal->setCheckable(true);
|
||||||
pActionSpeedSlow->setCheckable(true);
|
pActionSpeedSlow->setCheckable(true);
|
||||||
pActionSpeedVerySlow->setCheckable(true);
|
pActionSpeedVerySlow->setCheckable(true);
|
||||||
|
pActionSpeedManual->setCheckable(true);
|
||||||
|
|
||||||
QActionGroup* pSpeedActionGroup = new QActionGroup(this);
|
QActionGroup* pSpeedActionGroup = new QActionGroup(this);
|
||||||
|
|
||||||
|
@ -597,6 +612,7 @@ void MainWindow_C::SetupMenu()
|
||||||
pSpeedActionGroup->addAction(pActionSpeedBelowNormal);
|
pSpeedActionGroup->addAction(pActionSpeedBelowNormal);
|
||||||
pSpeedActionGroup->addAction(pActionSpeedSlow);
|
pSpeedActionGroup->addAction(pActionSpeedSlow);
|
||||||
pSpeedActionGroup->addAction(pActionSpeedVerySlow);
|
pSpeedActionGroup->addAction(pActionSpeedVerySlow);
|
||||||
|
pSpeedActionGroup->addAction(pActionSpeedManual);
|
||||||
//
|
//
|
||||||
// View
|
// View
|
||||||
//
|
//
|
||||||
|
@ -655,6 +671,7 @@ void MainWindow_C::InitMenuRefreshSpeed()
|
||||||
case BELOW_NORMAL_REFRESH_SPEED : pActionSpeedBelowNormal->setChecked(true); break;
|
case BELOW_NORMAL_REFRESH_SPEED : pActionSpeedBelowNormal->setChecked(true); break;
|
||||||
case SLOW_REFRESH_SPEED : pActionSpeedSlow->setChecked(true); break;
|
case SLOW_REFRESH_SPEED : pActionSpeedSlow->setChecked(true); break;
|
||||||
case VERY_SLOW_REFRESH_SPEED : pActionSpeedVerySlow->setChecked(true); break;
|
case VERY_SLOW_REFRESH_SPEED : pActionSpeedVerySlow->setChecked(true); break;
|
||||||
|
case MANUAL_REFRESH_SPEED : pActionSpeedManual->setChecked(true); break;
|
||||||
//--
|
//--
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -798,7 +815,7 @@ MainWindow_C::MainWindow_C(RpcCore_T* pRpcCore)
|
||||||
//
|
//
|
||||||
pRefreshTimer = new QTimer(this);
|
pRefreshTimer = new QTimer(this);
|
||||||
connect(pRefreshTimer, SIGNAL(timeout()), this, SLOT(RefreshViews()));
|
connect(pRefreshTimer, SIGNAL(timeout()), this, SLOT(RefreshViews()));
|
||||||
pRefreshTimer->start(this->RefreshSpeedInMs);
|
if (this->RefreshSpeedInMs) pRefreshTimer->start(this->RefreshSpeedInMs);
|
||||||
|
|
||||||
InitColumnsDialog();
|
InitColumnsDialog();
|
||||||
}
|
}
|
|
@ -51,6 +51,7 @@ private slots:
|
||||||
void SetUpdateSpeedAsBelowNormal();
|
void SetUpdateSpeedAsBelowNormal();
|
||||||
void SetUpdateSpeedAsSlow();
|
void SetUpdateSpeedAsSlow();
|
||||||
void SetUpdateSpeedAsVerySlow();
|
void SetUpdateSpeedAsVerySlow();
|
||||||
|
void SetUpdateSpeedAsManual();
|
||||||
void ShowColumnsDialog();
|
void ShowColumnsDialog();
|
||||||
void UpdateColumns();
|
void UpdateColumns();
|
||||||
//--
|
//--
|
||||||
|
@ -86,6 +87,7 @@ private:
|
||||||
QAction* pActionSpeedBelowNormal;
|
QAction* pActionSpeedBelowNormal;
|
||||||
QAction* pActionSpeedSlow;
|
QAction* pActionSpeedSlow;
|
||||||
QAction* pActionSpeedVerySlow;
|
QAction* pActionSpeedVerySlow;
|
||||||
|
QAction* pActionSpeedManual;
|
||||||
QAction* pAddressAbsolute;
|
QAction* pAddressAbsolute;
|
||||||
QAction* pAddressRva;
|
QAction* pAddressRva;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue