From 05320f477a1a84498fb06b369776e545fd1c9a3b Mon Sep 17 00:00:00 2001 From: Stefan Markovic Date: Thu, 2 Jun 2022 10:14:20 +0200 Subject: [PATCH] Cleanup --- .github/actions/spell-check/expect.txt | 8 ++++++++ .../PowerRenameContextMenu/dllmain.cpp | 15 +-------------- src/modules/powerrename/dll/dllmain.cpp | 4 ++-- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index f5877b1a4d..f1ab5092d4 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -452,6 +452,7 @@ DLGFRAME DLGMODALFRAME dlib DLIMAGES +dllimport dllexport dllhost dllmain @@ -769,6 +770,7 @@ HWNDNEXT HWNDPREV IAction IActivated +IActivation IAnimatable IApp IApplication @@ -1399,6 +1401,7 @@ NTFS NTSTATUS nuget nuint +nullonfailure nullopt nullptr numberbox @@ -1530,6 +1533,7 @@ powercfg powerlauncher powerpreview powerrename +POWERRENAMECONTEXTMENU POWERRENAMETEST powertoy powertoysinterop @@ -1740,6 +1744,7 @@ RUNLEVEL runsettings runtimeclass runtimeconfig +runtimeobject runtimes RUS rvalue @@ -1932,6 +1937,7 @@ stl stoi stol stoll +storelogo stoul stoull strcmp @@ -2133,6 +2139,7 @@ unregister unregistering unremapped unsubscribe +unvirtualized Updatelayout UPGRADINGPRODUCTCODE upto @@ -2330,6 +2337,7 @@ wregex WResize writefile Wrk +wrl wsf wsh wsl diff --git a/src/modules/powerrename/PowerRenameContextMenu/dllmain.cpp b/src/modules/powerrename/PowerRenameContextMenu/dllmain.cpp index d5d7b19cf9..12658bc50b 100644 --- a/src/modules/powerrename/PowerRenameContextMenu/dllmain.cpp +++ b/src/modules/powerrename/PowerRenameContextMenu/dllmain.cpp @@ -186,7 +186,6 @@ private: return hr; } CAtlFile writePipe(hWritePipe); - MessageBox(parent, L"AAAAAAAAAAAAA", path.c_str(), MB_OK); CString commandLine; commandLine.Format(_T("\"%s\""), lpApplicationName); @@ -215,16 +214,9 @@ private: NULL, &startupInfo, &processInformation); - HWND parent2 = nullptr; - if (m_site) - { - RETURN_IF_FAILED(IUnknown_GetWindow(m_site.Get(), &parent2)); - MessageBox(parent, path.c_str(), L"IMA SAJT", MB_OK); - } RunNonElevatedEx(path.c_str(), {}, get_module_folderpath(g_hInst)); - MessageBox(parent, path.c_str(), L"asd352432424", MB_OK); - ShellExecute(parent2, L"open", L"C:\\Users\\stefan\\Projects\\PowerToys\\x64\\Debug\\modules\\PowerRename\\PowerToys.PowerRename.exe", nullptr, nullptr, SW_SHOWNORMAL); + delete[] lpszCommandLine; if (!CloseHandle(processInformation.hProcess)) { @@ -236,7 +228,6 @@ private: hr = HRESULT_FROM_WIN32(GetLastError()); return hr; } - MessageBox(parent, path.c_str(), L"CCCCCCCCCCCCCCCC", MB_OK); //m_pdtobj will be NULL when invoked from the MSIX build as Initialize is never called (IShellExtInit functions aren't called in case of MSIX). DWORD fileCount = 0; @@ -256,10 +247,6 @@ private: // Write the file path into the input stream for image resizer writePipe.Write(fileName, fileName.GetLength() * sizeof(TCHAR)); } - std::wstring asd = L"asdasdasd"; - asd += L" " + std::to_wstring( fileCount) + L" SDASDASDAD"; - MessageBox(parent, asd.c_str(), L"CCCCCCCCCCCCCCCC", MB_OK); - writePipe.Close(); } Trace::InvokedRet(hr); diff --git a/src/modules/powerrename/dll/dllmain.cpp b/src/modules/powerrename/dll/dllmain.cpp index 31ecb7d8ed..b6b4d0d1d4 100644 --- a/src/modules/powerrename/dll/dllmain.cpp +++ b/src/modules/powerrename/dll/dllmain.cpp @@ -195,8 +195,8 @@ public: if (deploymentOperation.Status() == AsyncStatus::Error) { auto deploymentResult{ deploymentOperation.GetResults() }; - auto asd = deploymentOperation.ErrorCode(); - auto asd1 = deploymentResult.ErrorText().c_str(); + auto errorCode = deploymentOperation.ErrorCode(); + auto errorText = deploymentResult.ErrorText().c_str(); returnValue = 1; } else if (deploymentOperation.Status() == AsyncStatus::Canceled)