diff --git a/CMakeLists.txt b/CMakeLists.txt index d1f267b..929228d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project(RpcView) set(RPCVIEW_VERSION_MAJOR 0) set(RPCVIEW_VERSION_MINOR 3) -set(RPCVIEW_VERSION_RELEASE 0) +set(RPCVIEW_VERSION_RELEASE 1) if($ENV{APPVEYOR_BUILD_NUMBER}) set(RPCVIEW_VERSION_BUILD $ENV{APPVEYOR_BUILD_NUMBER}) else() diff --git a/RpcView/InterfaceSelectedVisitor.cpp b/RpcView/InterfaceSelectedVisitor.cpp index f3433ba..f5c2e62 100644 --- a/RpcView/InterfaceSelectedVisitor.cpp +++ b/RpcView/InterfaceSelectedVisitor.cpp @@ -8,6 +8,10 @@ #include "../RpcCommon/Misc.h" #include "Pdb.h" #include +#include + +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) @@ -18,12 +22,15 @@ InterfaceSelectedVisitor_C::InterfaceSelectedVisitor_C(quint32 Pid, RPC_IF_ID* p this->pRpcCoreCtxt = pRpcCoreCtxt; 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() { + RpcStringFreeW(&pUuidString); if (pRpcInterfaceInfo != NULL) { 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)); } + 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)|| (pRpcInterfaceInfo->pProcFormatString==NULL)) { diff --git a/RpcView/MainWindow.cpp b/RpcView/MainWindow.cpp index d67aed3..4eac5de 100644 --- a/RpcView/MainWindow.cpp +++ b/RpcView/MainWindow.cpp @@ -19,6 +19,7 @@ #define BELOW_NORMAL_REFRESH_SPEED 2000 #define SLOW_REFRESH_SPEED 5000 #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 @@ -458,6 +459,7 @@ void MainWindow_C::ConfigureSymbols() void MainWindow_C::SetUpdateSpeedAsFast() { this->RefreshSpeedInMs = FAST_REFRESH_SPEED; + pRefreshTimer->start(); pRefreshTimer->setInterval(this->RefreshSpeedInMs); } @@ -466,6 +468,7 @@ void MainWindow_C::SetUpdateSpeedAsFast() void MainWindow_C::SetUpdateSpeedAsNormal() { this->RefreshSpeedInMs = NORMAL_REFRESH_SPEED; + pRefreshTimer->start(); pRefreshTimer->setInterval(this->RefreshSpeedInMs); } @@ -474,6 +477,7 @@ void MainWindow_C::SetUpdateSpeedAsNormal() void MainWindow_C::SetUpdateSpeedAsBelowNormal() { this->RefreshSpeedInMs = BELOW_NORMAL_REFRESH_SPEED; + pRefreshTimer->start(); pRefreshTimer->setInterval(this->RefreshSpeedInMs); } @@ -482,6 +486,7 @@ void MainWindow_C::SetUpdateSpeedAsBelowNormal() void MainWindow_C::SetUpdateSpeedAsSlow() { this->RefreshSpeedInMs = SLOW_REFRESH_SPEED; + pRefreshTimer->start(); pRefreshTimer->setInterval(this->RefreshSpeedInMs); } @@ -490,9 +495,17 @@ void MainWindow_C::SetUpdateSpeedAsSlow() void MainWindow_C::SetUpdateSpeedAsVerySlow() { this->RefreshSpeedInMs = VERY_SLOW_REFRESH_SPEED; + pRefreshTimer->start(); pRefreshTimer->setInterval(this->RefreshSpeedInMs); } +//------------------------------------------------------------------------------ +void MainWindow_C::SetUpdateSpeedAsManual() +{ + this->RefreshSpeedInMs = MANUAL_REFRESH_SPEED; + pRefreshTimer->stop(); +} + //------------------------------------------------------------------------------ void MainWindow_C::InvokeFindShortcut() @@ -583,12 +596,14 @@ void MainWindow_C::SetupMenu() pActionSpeedBelowNormal = pSubMenupdateSpeed->addAction("2 seconds", this, SLOT(SetUpdateSpeedAsBelowNormal())); pActionSpeedSlow = pSubMenupdateSpeed->addAction("5 seconds", this, SLOT(SetUpdateSpeedAsSlow())); pActionSpeedVerySlow = pSubMenupdateSpeed->addAction("10 seconds", this, SLOT(SetUpdateSpeedAsVerySlow())); + pActionSpeedManual = pSubMenupdateSpeed->addAction("manual", this, SLOT(SetUpdateSpeedAsManual())); pActionSpeedFast->setCheckable(true); pActionSpeedNormal->setCheckable(true); pActionSpeedBelowNormal->setCheckable(true); pActionSpeedSlow->setCheckable(true); pActionSpeedVerySlow->setCheckable(true); + pActionSpeedManual->setCheckable(true); QActionGroup* pSpeedActionGroup = new QActionGroup(this); @@ -597,6 +612,7 @@ void MainWindow_C::SetupMenu() pSpeedActionGroup->addAction(pActionSpeedBelowNormal); pSpeedActionGroup->addAction(pActionSpeedSlow); pSpeedActionGroup->addAction(pActionSpeedVerySlow); + pSpeedActionGroup->addAction(pActionSpeedManual); // // View // @@ -655,6 +671,7 @@ void MainWindow_C::InitMenuRefreshSpeed() case BELOW_NORMAL_REFRESH_SPEED : pActionSpeedBelowNormal->setChecked(true); break; case SLOW_REFRESH_SPEED : pActionSpeedSlow->setChecked(true); break; case VERY_SLOW_REFRESH_SPEED : pActionSpeedVerySlow->setChecked(true); break; + case MANUAL_REFRESH_SPEED : pActionSpeedManual->setChecked(true); break; //-- default: break; @@ -798,7 +815,7 @@ MainWindow_C::MainWindow_C(RpcCore_T* pRpcCore) // pRefreshTimer = new QTimer(this); connect(pRefreshTimer, SIGNAL(timeout()), this, SLOT(RefreshViews())); - pRefreshTimer->start(this->RefreshSpeedInMs); + if (this->RefreshSpeedInMs) pRefreshTimer->start(this->RefreshSpeedInMs); InitColumnsDialog(); } \ No newline at end of file diff --git a/RpcView/MainWindow.h b/RpcView/MainWindow.h index d206a03..b9295ca 100644 --- a/RpcView/MainWindow.h +++ b/RpcView/MainWindow.h @@ -51,6 +51,7 @@ private slots: void SetUpdateSpeedAsBelowNormal(); void SetUpdateSpeedAsSlow(); void SetUpdateSpeedAsVerySlow(); + void SetUpdateSpeedAsManual(); void ShowColumnsDialog(); void UpdateColumns(); //-- @@ -86,6 +87,7 @@ private: QAction* pActionSpeedBelowNormal; QAction* pActionSpeedSlow; QAction* pActionSpeedVerySlow; + QAction* pActionSpeedManual; QAction* pAddressAbsolute; QAction* pAddressRva;