Mail Archives: djgpp/1995/07/29/12:15:40
Malcolm Taylor (empty AT sans DOT vuw DOT ac DOT nz) wrote:
: Christoph Kukulies (kuku AT gilberto DOT physik DOT rwth-aachen DOT de) wrote:
: : You are missing the point. If we had an assembler level (int based)
: : documentation of the Windows GUI API a gcc based Windows API
: : wouldn't be far off. How else will you be able to implement one
: : without the MS libraries?
: There is a problem here, Windows doesn't use interrupts for it's kernal
: calls. It uses the same mechanism by which a DLL is loaded (the kernal is
: just a DLL anyway) to load all the functions into callbacks. I think that
: the library consists of a host of functions which have the Pascal
: signature, but just have a call to a function pointer in them. The C
: equivalent would be:
: void *Func(arg1,arg2,...)
: {
: call Func_pointer;
: }
: although in C you would have to make the stubs reverse the argument order
: so that they conform to the Pascal calling convention. This would make
: any DJGPP implementation slower unless you can create a __pascal__
: keyword in gcc.
: My advice would be to reverse engineer a small windows program.
: The format of the executable is fairly easy to understand, then find (get
: hold of) a dissasebler. Cut out the code segment from the executable and
: dissaseble it. This should give you the information on how the executable
: loads and sets up etc. Look at RB's interrupt list, you may find an
: interrupt for loading a DLL and/or EXE file. Another idea would be to get
: hold of the librarys and to reverse engineer them.
: The only other thing that I would have to say is that some of
: this is probably an infringment of copyright. You could always try asking
: Microsoft for the information.
: Malcolm
: PS. Sorry it was so long.
- Raw text -