[Wine] running a command from a Windows app

Geoff Streeter geoff at dyalog.com
Tue Sep 20 03:16:43 CDT 2005


At 2005-09-19 22:34 -0700, Frank W wrote:
>yes, it's my program, how to call system() in a windows app? any sample 
>code in C? thanks
>
>Geoff Streeter <geoff at dyalog.com> wrote:
>At 2005-09-19 06:38 -0700, Frank W wrote:
> >Hi,
> >I would like to print a text file from my app using the linux command
> >'lp', any idea how to do this? thanks.
>
>If this is really your own application then code a call to system().

I haven't tried this with Wine. I code to MainWin. However, I think the 
following should work:
         Code a call to LoadLibrary() to load glibc. If it fails its a 
Windows box.
         Code a call to GetProcAddress() to get the address of system().
         Call via the pointer you now have.  




More information about the wine-users mailing list