Skip to content

Conversation

@andrewachen
Copy link
Contributor

Mostly figured out via Claude. Tested on Windows 11 Pro 24H2 26100.4946.

@RamonUnch
Copy link
Owner

Very nice, Thanks for your effort,

I have a small question regarding the WinMain.
unfuckWinMain simply calls tWinMain with corrects parameters. I guess you cannot get rid of the CRT in ARM mode and thus cannt use -nostdlib.

It seems you use the ANSI WinMain entrypoint, it does not really matter in your case because all parameters are ignored.
To forec gcc to take the Unicode entry point wWinMain() you can use the -municode parameter. AltSnap.c defines tWinMain which is simply is a generic alias for both unicode and ANSI.

So in short I believe that you could remove the wrapper and add to gcc the parameters
-DtWinMain=wWinMain and -municode.

@andrewachen
Copy link
Contributor Author

Thanks for the feedback -- that does work. I've updated the PR with those changes.

@RamonUnch
Copy link
Owner

Nice!

@RamonUnch RamonUnch merged commit c76eb96 into RamonUnch:main Aug 28, 2025
@andrewachen andrewachen deleted the woa branch August 28, 2025 15:39
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

Successfully merging this pull request may close these issues.

2 participants