Hi, i'm using openwatcom under wine, all is ok, but next code will not work: #include <windows.h> void main( void ) { system( "foo.exe" ); } same problem for: #include <windows.h> void main( void ) { WinExec( "foo.exe", SW_SHOW ); } where "foo.exe" is a windows console aplication if i try to launch foo.exe with wine in a terminal window is working example: wine foo.exe is working fine ! how can i make my code working ? -- George Enescu 16/13 Hunedoara mobil: 0720301842 tel. : 0354401534 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.winehq.org/pipermail/wine-users/attachments/20070913/e4ca7280/attachment.htm
At 2007-09-13 11:24, Romeo Petruca wrote:>Hi, > >i'm using openwatcom under wine, all is ok, but next code will not work: > >#include <windows.h> >void main( void ) { > system( "foo.exe" ); >} > >same problem for: > >#include <windows.h> >void main( void ) { > WinExec( "foo.exe", SW_SHOW ); >} > >where "foo.exe" is a windows console aplication > >if i try to launch foo.exe with wine in a terminal window is working > >example: > >wine foo.exe > >is working fine ! > >how can i make my code working ? > >-- >George Enescu 16/13 >Hunedoara >mobil: 0720301842 >tel. : 0354401534 >_______________________________________________ >wine-users mailing list >wine-users at winehq.org >http://www.winehq.org/mailman/listinfo/wine-userssystem() uses a shell to parse the command line. In the old days it used to be a Bourne shell. These days it is probably bash. So try: system("wine foo.exe"); Geoff
Paul Romanyszyn
2007-Sep-13 16:31 UTC
[Wine] problem with exec,system,WinExec, C functions
Geoff Streeter wrote:> At 2007-09-13 11:24, Romeo Petruca wrote: >> Hi, >> >> i'm using openwatcom under wine, all is ok, but next code will not work: >> >> #include <windows.h> >> void main( void ) { >> system( "foo.exe" ); >> } >> >> same problem for: >> >> #include <windows.h> >> void main( void ) { >> WinExec( "foo.exe", SW_SHOW ); >> } >> >> where "foo.exe" is a windows console aplication >> >> if i try to launch foo.exe with wine in a terminal window is working >> >> example: >> >> wine foo.exe >> >> is working fine ! >> >> how can i make my code working ? >> >> -- >> George Enescu 16/13 >> Hunedoara >> mobil: 0720301842 >> tel. : 0354401534 >> _______________________________________________ >> wine-users mailing list >> wine-users at winehq.org >> http://www.winehq.org/mailman/listinfo/wine-users > > system() uses a shell to parse the command line. In the old days it > used to be a Bourne shell. These days it is probably bash. So try: > system("wine foo.exe"); > > GeoffUnless it is a regression in the last week, rebuilding current git now. I have been using this in borland BC++4.5 and it works with ubuntu 7.04 and has for several other distro's in the last few years. It is a 16 bit application. Paul R. stpcpy(comandstr,"kpnl320.exe "); strcat(comandstr,_argv[0]); /* pass executable file name to application */ if (FindWindow(0,"Simulator EDD-320") == NULL) WinExec(comandstr,SW_SHOWNA);
Referring to http://winehq.org/pipermail/wine-users/2007-September/027759.html Hi Romeo, It worked for me though. Could you specify what kind of error you got? Thanks, Jennifer
sorry for delayed answer is working, but in backgroun, no console window opened for the program launched with: system( "foo.exe" ); how can i see the console window ? Jennifer Lai-2 wrote:> > Referring to > http://winehq.org/pipermail/wine-users/2007-September/027759.html > > Hi Romeo, > It worked for me though. Could you specify what kind of error you got? > Thanks, > Jennifer > > _______________________________________________ > wine-users mailing list > wine-users at winehq.org > http://www.winehq.org/mailman/listinfo/wine-users > >-- View this message in context: http://www.nabble.com/problem-with-exec%2Csystem%2CWinExec%2C-C-functions-tf4434868.html#a12813526 Sent from the Wine - Users mailing list archive at Nabble.com.
Hi there, system() and WinExec() both worked for me. However, try system( "wine foo.exe" ); instead, it should open up the OpenWatcom console in a second. Thanks On 9/21/07, romeo.petruca <romeo.petruca at gmail.com> wrote:> > sorry for delayed answer > > is working, but in backgroun, no console window opened for the program > launched with: > > system( "foo.exe" ); > > how can i see the console window ? > > > Jennifer Lai-2 wrote: > > > > Referring to > > http://winehq.org/pipermail/wine-users/2007-September/027759.html > > > > Hi Romeo, > > It worked for me though. Could you specify what kind of error you got? > > Thanks, > > Jennifer > > > > _______________________________________________ > > wine-users mailing list > > wine-users at winehq.org > > http://www.winehq.org/mailman/listinfo/wine-users > > > > > > -- > View this message in context: http://www.nabble.com/problem-with-exec%2Csystem%2CWinExec%2C-C-functions-tf4434868.html#a12813526 > Sent from the Wine - Users mailing list archive at Nabble.com. > > > _______________________________________________ > wine-users mailing list > wine-users at winehq.org > http://www.winehq.org/mailman/listinfo/wine-users >