Board index » delphi » StrtoChar?

StrtoChar?

Hello,

Is there such a command what compiles PChar to String? I need it when I
ask user to run a program typed in the
listbox. I use Winexec() command and it needs PChar for commands. For
example:
var
taken01: String;
.....
begin
case listbox1.ItemIndex of
     0:winexec(taken01,1);
....

taken01 has been taken from the registry.

Timo Haavisto, KTTP CO. LTD.

 

Re:StrtoChar?


check out the strPas function.  That converts pChar to Pascal strings.

Arrow

Quote
Timo Haavisto wrote in message <36F7C590.F557...@dlc.com>...
>Hello,

>Is there such a command what compiles PChar to String? I need it when I
>ask user to run a program typed in the
>listbox. I use Winexec() command and it needs PChar for commands. For
>example:
>var
>taken01: String;
>.....
>begin
>case listbox1.ItemIndex of
>     0:winexec(taken01,1);
>....

>taken01 has been taken from the registry.

>Timo Haavisto, KTTP CO. LTD.

Re:StrtoChar?


"Arrow",

Your machine is infected with the HAPPY99.EXE worm. Please refrain
from posting in these newsgroups until you have disinfected your
machine.

For more information, see
http://beta.nai.com/public/datafiles/valerts/vinfo/w32ska.htm

---
Yorai Aminov (TeamB)
http://ourworld.compuserve.com/homepages/yaminov
(TeamB cannot answer questions received via email.
To contact me for any other reason remove nospam from my address)

Re:StrtoChar?


You can cast it to a pchar

Re:StrtoChar?


Quote
Nick Spurrier wrote:
> You can cast it to a pchar

But in a SQL only

Re:StrtoChar?


try.....

 case listbox1.ItemIndex of
      0:winexec(pChar(taken01),1);

Other Threads