Xref: news-dnh.mv.net comp.os.msdos.djgpp:1230 Path: news-dnh.mv.net!mv!news.sprintlink.net!uunet!in1.uu.net!news.biu.ac.il!news.tau.ac.il!lune.math.tau.ac.il!oripessc From: oripessc AT lune DOT math DOT tau DOT ac DOT il (Pessach Ori) Newsgroups: comp.os.msdos.djgpp Subject: Re: Windows programming in Gnu C/C++ Date: 29 Jul 1995 06:32:35 GMT Organization: School of Math & CS - Tel Aviv University , Tel Aviv , ISRAEL. Lines: 39 References: <3uk4l9$jj6 AT st-james DOT comp DOT vuw DOT ac DOT nz> Nntp-Posting-Host: lune.math.tau.ac.il To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp 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.