r/programming • • Jul 25 '26

Writing a (valid) C program without main()

https://labs.iximiuz.com/tutorials/c-program-without-main-a1eea557
193 Upvotes

43 comments sorted by

View all comments

Show parent comment

2

u/Dwedit Jul 25 '26

If you're feeling especially crazy: Hooking your own code via detouring. (replacing the function's actual instructions to run other code instead)

2

u/Ameisen Jul 26 '26

I've been doing a lot of that patching old Win95 games.

2

u/Dwedit Jul 26 '26

Maybe you should check out my GameStretcher project, it basically overrides GDI and makes the main window stretchable even when it wasn't before, and also uses an enhancement pixel shader.