Hi,
once again I would like to get your advice on spec files. I now compiled a Windows application successful against winelib and can link it without problems. However, the application segfaults immediately when starting wine. I am tracking this back to .spec files (although I will need to debug in the next free time to be sure), since they are the weakest link I am seeing, since I wrote most of them by hand. So it would be great if you can answer the following questions:
- Automatic generation: I composed the spec files by hand, based on Windows def files. Is there an automatic way to do that? I noticed a (somewhat hidden) tool called winedump, with nearly not existing documentation, but could not make much use of it. Any hints here?
- Stack size and parameters in spec file: The def files are, as far as I know, very similar to the spec files: they contain the function name (either mangled or not mangled), as well as (most of the time) the stack space - format: functionname@stackspace. Is there anything wrong to translate an entry for "char* testfunc(char* str, int var1, long var2, long* ptr)" called "testfunc@16" into "@stdcall testfunc(ptr ptr ptr ptr)", without caring for the type of parameters? More explicitely asked, what use do I have from using str or long instead of ptr in the spec file?
- Stdcall vs. cdecl How do I find out whether a function uses CDECL instead of STDCALL? I found the information (link lost unfortunately) that entries in the def file like testfunc1@0 are called via STDCALL, whereas in case of testfunc2 without any @ specifying the space is CDECL. Is this guess right? If not, how else do I find this out?
Thanks again for any help!
Cheers, Martin ______________________________________________________________________________ Bestes Testergebnis: Stiftung Warentest Doppelsieg fur WEB.DE FreeMail und WEB.DE Club. Nur fuer unsere Nutzer! http://f.web.de/?mc=021182