How can I call the Windows API functions from the Linux binary inside the Windows Subsystem for Linux (WSL)? I am sure there is no documented way to do this, but it may still be interesting to try.
I am interested in calling Win32 functions, or if this is not possible, at least for the Windows NT API (Nt *, Zw *). Native APIs should be at least accessible, since the component that runs Linux processes (lxss) depends on these APIs.
You may need to create a custom LoadLibrary function to load Windows DLLs. Another idea would be to search for process memory for known parts of the kernel functions (that is, their user mode entry points).
Has anyone experimented with this and would like to share a solution?
windows-kernel windows-subsystem-for-linux
jdm
source share