OK, I've got it working now with ShellExecute. Just had to find a webpage that has the syntax! The place that I found the syntax on was http://www.codebake.com/windowsexec.php if anyone's interested.
If I just use the PAnsiChar variable instead of the string variable Delphi just complains that 'String' and 'PAnsiChar' are incompatible types. The conversion from string to PAnsiChar needs to happen as far as I know, beleive me.
Could somebody please tell me why this code works:
WinExec('ping [ipaddress]', SW_SHOW);
Where [ipaddress] is an IP address (obviously!).
But when i use a 'PAnsiChar' string-like variable (PAnsiChar is the type that it wants you to use when using the WinExec command) constructed with text...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.