Hi, It seems win32 programs that link with msvcrt get a load of calls inserted into their pre main/WinMain startup code to initialise the run time. Just to get a simple program running (well, crashing _after_ main()) required implementing a load of init stuff. I was catering for Winelib programs by having this initialisation done at load time, and then having the init calls do nothing. Question: Should I add to winebuild the generation of the calls that are made (whenever msvcrt is imported) or should I keep going the way I am? I'm pretty sure that my current method wont work without being hacky. One of the pre-main calls is __set_app_type() which tells the crt whether we are a console or gui app (gui apps have assertions in dialogs etc). Unless the winebuild generated code calls (at least) this function, its going to be difficult (maybe impossible) for the dll to work out at load time. Exception handling will be a nightmare as well (main should be wrapped in try/catch). So, does anyone object to my modifying winebuild to do this? Cheers, Jon p.s. Happy new year to you all! -- "May their negative actions ripen upon me. And may all my virtues ripen upon them." "If it could be talked about, everybody would have told their brother." [EMAIL PROTECTED] , [EMAIL PROTECTED]