As the subject says, I have a Windows application and I wish to run a native linux application from withing it. The main Win32 API calls for running another apllication are
ShellExecute WinExec CreateProcess
I have tried calling a native linux program with these (nautilus) and it consistently fails. Do I need a fully specified path (nautilus is in the search path mind you)?
It either does nothing or hangs Wine when I try calling these applications. I assume Wine is running the application as if it is a Windows app and failing.
Thanks for any help in advance.
On 10/12/05, Craig macLeod craig@nch.com.au wrote:
As the subject says, I have a Windows application and I wish to run a native linux application from withing it. The main Win32 API calls for running another apllication are
ShellExecute WinExec CreateProcess
I have tried calling a native linux program with these (nautilus) and it consistently fails. Do I need a fully specified path (nautilus is in the search path mind you)?
I just tried it, and it works. Here's what I did: copied example CreateProcess code from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/bas... Modified it to use an absolute path, e.g. CreateProcess( NULL, TEXT("c:\windows\MyChildProcess"), ... since it didn't seem to work otherwise (probably a PATH problem). Created a shell script with that name, e.g.
$ cat > .wine/drive_c/windows/MyChildProcess <<_EOF_ #!/bin/sh xeyes _EOF_ $ chmod 755 .wine/drive_c/windows/MyChildProcess
Compiled the demo app with msvc, ran it with wine, voila! xeyes are following me around on the screen.
I have tried calling a native linux program with these (nautilus) and it consistently fails. Do I need a fully specified path (nautilus is in the search path mind you)?
I'd say that you're free to use a linux syscall to do whatever you want, including forking the process and exec'ing the linux program. That's the beauty of wine. You have win32 *and* linux APIs available at the same time.
Cheers, Kuba