For example, something like this:
Code: Select all
typedef int (* fn_recv)(int fd, void * buf, unsigned int bufsize, int flags);
fn_recv p_recv;
h = GetModuleHandle("libc.so");
p_recv = (fn_recv)GetProcAddress(h, "recv");
It is enough to just get memory address of required native library function.
Of course, windows-compiled binary should be aware of wine environment to do this. I cannot recompile entire application with winelib, but can do some patches to it or load any DLL from it.