Board index » delphi » Executing External Programs

Executing External Programs

Hi All;
    I am using 'winexec' to invoke programs external to my Delphi app. I
want to use a variable like the contents of an edit box or a data field
to name the executable at run time. Can someone please give me an
example of the proper syntax? Have tried '"+edit1.text+"' like in Object
pascal but it dowsn't seem to work in windows function. Thanks.

Richard

 

Re:Executing External Programs


Quote
>    I am using 'winexec' to invoke programs external to my Delphi app. I
>want to use a variable like the contents of an edit box or a data field
>to name the executable at run time. Can someone please give me an
>example of the proper syntax? Have tried '"+edit1.text+"' like in Object
>pascal but it dowsn't seem to work in windows function. Thanks.

You need to pass a pchar.
you can set a string variable equal to your edit1.text and then cast it as a
pchar.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads