How is Win/Dos syscalls implemented in Wine?

Peter Andersson kanelballe at softhome.net
Fri Oct 25 19:48:49 CDT 2002


Thanks for putting my thinking on the right track again...

Conclusion:
The ntdll is for wine apps what libc is for Linux/Unix.
Syscalls is made from ntdll and the native version is never
run. 

You are right about the syscalls in Linux, too bad
theres no protection for it though. It should be, otherwise
there could appear wine_linux viruses.  
Cant you fix this with ptrace?

Thanks for your help!

//Peter

On Friday 25 October 2002 17.26, Ove Kaaven wrote:
> On Fri, 25 Oct 2002, Peter Andersson wrote:
> > Hello!
> > Perhaps someone can give me a good answer to this question.
> > Please give me a direct answer, I have allready been trouh the wine
> > FAQ:s , docs, code, etc.
> >
> > I know DOS syscalls is made using interupts (int instruction) but,
> > is Windows/NT syscalls made the same way.
>
> What are Windows/NT syscalls? Win32 apps doesn't make any syscalls, they
> just call the system DLLs (which is just shared libraries). Wine
> implements those DLLs in its own way.
>
> > How does wine stop these instructions from reaching the unix kernel?
>
> If you're talking about interrupts, the ones that DOS/Windows app may use
> aren't accepted by Linux, so a segmentation fault happens when an app
> tries to issue such an interrupt. Wine can catch that segmentation fault
> by installing a SIGSEGV signal handler. If you're talking about the Win32
> API, then Wine just links the app to its own version of that API, so it
> calls into the Wine-implemented DLLs.




More information about the wine-users mailing list