You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lazy_importer/shadow_syscall/inline_syscall in plain C? #337
Sorry for going off-topic, but I don’t trust third-party Discussions boards like #333. They tend to appear and disappear suddenly, just like the one mentioned in #305 (the maintainer left GitHub and their repositories vanished). So I’ll post it here instead. Ideally, it would be best to have a Discussions board enabled directly on this repository, as I proposed in #305.
Here are the projects I mentioned in the title of this thread:
Of course, I don’t do any hacking like the developers of these projects. But I think the idea is cool (at least to me). I don’t want to include a large windows.h. Instead, I can load the shared library and call functions directly without a function pointer prototype or strict type correctness. I’ve seen something similar in some Go code I came across, though I can’t remember exactly where. This is very cool.
I'm also unhappy with the windows.h situation. There seem to be just two escapes:
Pre-compiled headers. Include windows.h in your own header, include that header first in your sources, and pre-compile it. The extra setup generally requires a not-dumb build system, even if simple. That interferes with my goals of single file projects with one-shot builds.
Declare the Win32 interfaces yourself. It's tedious, but you can choose better types and names than Microsoft. This is what I usually do.
As for "lazy importing" I've have a little experiment along these lines here in u-config:
It technically imports and exports nothing (check it with peports), and instead interrogates the PEB to find the handful of needed Win32 functions. It's not meant for obfuscation, and the string names (unhashed) are still present in the PE image.
They tend to appear and disappear suddenly
Yeah, don’t build your castle in other people’s kingdoms and all. Though of course we're here in GitHub's kingdom. It comes with lots of benefits and freebees so I'm willing to make the trade-off building, in part, within this kingdom.
it would be best to have a Discussions board enabled directly on this repository
Though of course we're here in GitHub's kingdom. It comes with lots of benefits and freebees so I'm willing to make the trade-off building, in part, within this kingdom.
Activity
skeeto commentedon Mar 14, 2026
I'm also unhappy with the
windows.hsituation. There seem to be just two escapes:windows.hin your own header, include that header first in your sources, and pre-compile it. The extra setup generally requires a not-dumb build system, even if simple. That interferes with my goals of single file projects with one-shot builds.As for "lazy importing" I've have a little experiment along these lines here in u-config:
skeeto/u-config@master...no-imports
It technically imports and exports nothing (check it with
peports), and instead interrogates the PEB to find the handful of needed Win32 functions. It's not meant for obfuscation, and the string names (unhashed) are still present in the PE image.Yeah, don’t build your castle in other people’s kingdoms and all. Though of course we're here in GitHub's kingdom. It comes with lots of benefits and freebees so I'm willing to make the trade-off building, in part, within this kingdom.
Done.
Peter0x44 commentedon Mar 14, 2026
#292 is an easy freebie we could be taking.