Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

standalone .exe? #11

Open
ne0YT opened this issue Mar 7, 2024 · 2 comments
Open

standalone .exe? #11

ne0YT opened this issue Mar 7, 2024 · 2 comments

Comments

@ne0YT
Copy link

ne0YT commented Mar 7, 2024

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
Copy link
Author

ne0YT commented Mar 13, 2024

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

@valinet
Copy link
Owner

valinet commented Mar 13, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants