Winexec() function

Winexec() function

Postby xProgrammer » Mon Dec 17, 2007 6:19 am

I started using the Winexec() function. It seems to work fine if you have only 1 parameter to pass but not for more than 1 parameter.

I am using it to run Open Office.

Winexec( ""ooffice", "Test1.rep" )

works but the following don't

Winexec( "ooffice", "-writer", "Test1.rep" )
Winexec( "ooffice", "Test1.rep", "Test2.rep" )

neither does

Winexec( "ooffice", "-writer Test1.rep" )
Winexec( "ooffice", "Test1.rep Test2.rep" )

But the following commands issued from a terminal window all work:

ooffice -writer Test1.rep
ooffice Test1.rep Test2.rep

It's no real issue at the moment as I can easily code around the apparent limitation for what I am needing to do at the moment, but maybe you can look at it one day and see if I am correct and fix. I inferred from the documentation that the function is intended to handle multiple parameters being passed. Then again maybe I have misunderstood the documentation and am coding incorrectly.

(Test1.rep and Test2.rep are just Open Office writer documents - the ones I am using are in OO html format and are being generated by my software.)

Thanks

Doug
(xProgrammer)
User avatar
xProgrammer
 
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia

Re: Winexec() function

Postby Enrico Maria Giordano » Mon Dec 17, 2007 9:14 am

The documentation clearly states:

WinExec( <nCmdLine>, <nCmdShow> ) --> <hInstance>


As you can see, the first parameter is the command line, parameters included. The second parameter is the show mode. The function expects only two parameters.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8310
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Mon Dec 17, 2007 10:00 am

Enrico,

FiveLinux WinExec() is inspired in Windows one, but it works a little different.

Doug,

You are right, actually we are only accepting one parameter. We need to modify it to accept an unlimited number of parameters. We are going to review it
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41312
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Mon Dec 17, 2007 10:38 am

Antonio Linares wrote:Enrico,

FiveLinux WinExec() is inspired in Windows one, but it works a little different.


Ops, I was not aware that this is a forum for FiveLinux, sorry.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8310
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Mon Dec 17, 2007 11:06 am

No problem, my friend :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41312
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveLinux / FiveDroid (Android)

Who is online

Users browsing this forum: No registered users and 2 guests