Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Converting a string to pchar
I'm using Delphi 4 (can't afford to upgrade) and I'm making a simple program that runs an external program with paramaters provided by the user. The problem is that the paramaters provided by the user are strings but WinExec needs a PChar. Can anyone tell me how I can get WinExec to accept a string or how I can convert the string into a PChar? Or perhaps another way of executing an external program which would accept a string? I've tried ShellExec which I saw mentioned in another post here but it doesn't work. It doesn't seem to recognize it.
0 · ·