Fix opening folder in Explorer way#17265
Fix opening folder in Explorer way#17265xomx wants to merge 3 commits intonotepad-plus-plus:masterfrom
Conversation
Using faster and less resource demanding way to open a folder in the Explorer.
Otherwise, with the previous ShellExecute "open" verb and "Explorer" cmd2Exec way, we got separate
"explorer.exe /factory,{75dff2b7-6936-4c06-a8bb-676a7b00b24b} -Embedding"
processes, launched by the service host process as parent by "svchost.exe -k DcomLaunch -p". These Explorer-processes then remained "alive" and blocked some allocated system resources, even if the user closed their corresponding Explorer folders.
|
With this PR, does Notepad++ also select the file in the Windows Explorer or does it just open the containing folder (because only the current directory is being used and not the current file path)? If not, then it's not the same as the old behavior (which also selected the file, though inconveniently using additional It seems to be technically just Thanks. |
Only this. Good point. So, looks like I won't be able to avoid bigger changes and will have to check that |
This reverts commit 69fadc6.
and the ShellExecute way with the "explore" verb, only as a fallback
|
I hate COM, but it seems that we have no much choice. |
I see, but for me, it's one of the things that the MS has done very well. And when used like this from N++, it becomes in fact only a simple & fast in-proc server (just like when you call a func in a DLL) and not the slower & more complicated RPC one. |
Fix #17060
and similar community issue https://community.notepad-plus-plus.org/topic/27276/open-containing-folder-in-explorer-always-launches-a-new-explorer-process-instead-of-re-using
STR & explanation with pics in the issue: #17060 (comment)
Using faster and less resource demanding way to open a folder in the Explorer.
Otherwise, with the previous ShellExecute "open" verb and "Explorer" cmd2Exec way, we got separate
"explorer.exe /factory,{75dff2b7-6936-4c06-a8bb-676a7b00b24b} -Embedding"
processes, launched by the service host process as parent by "svchost.exe -k DcomLaunch -p". These Explorer-processes then remained "alive" and blocked some allocated system resources, even if the user closed their corresponding Explorer folders.