sws icon indicating copy to clipboard operation
sws copied to clipboard

standalone .exe?

Open ne0YT opened this issue 11 months ago • 2 comments

hey there is it smh possible to have this as a standalone .exe to just run to have this functionality only? I don't use an explorer.exe at all (not using a shell-app).

ne0YT avatar Mar 07 '24 16:03 ne0YT

I built the .dll but I don't see how I can use it standalone. Is there a way to use it directly smh?

ne0YT avatar Mar 13 '24 02:03 ne0YT

ExplorerPatcher 'links' sws statically, i.e. the source code of sws is included in the ExplorerPatcher tree, and thus the functionality is directly called. See here: https://github.com/valinet/ExplorerPatcher/blob/master/ExplorerPatcher/dllmain.c#L6048

As far as I can see, the DLL exports a main function. So, LoadLibraryW the DLL in your code, then GetProcAddress for "main" and call that in a thread - the switcher will simply load. You can do something like CreateThread or, if running explorer.exe, place the DLL in C:\Windows named dxgi.dll and then from some other process CreateRemoteThread in explorer.exe calling main from dxgi.dll - multiple ways to do it, really, depends on your use case.

valinet avatar Mar 13 '24 22:03 valinet