Here is my problem:
in my version 8 project, I have this command:
vpi::createProcess(NullWin, Cde, Param, vpidomains::wsf_Minimized)
When compiling, there is this error.
"error c304: Retired entity 'vpi::createProcess/4->': Use useExe instead"
or if I indicate useExe, the compiler tells me that the useExe command is unknown
What should I replace my 'createProcess' command with?
Thank you for your help.
-
- Posts: 9
- Joined: 13 Feb 2024 9:17
-
- VIP Member
- Posts: 1466
- Joined: 28 Feb 2000 0:01
Re: Migration vp 8 to vp 11, createProcess retired entity
useExe is a class. Here is a simple usage:
Code: Select all
clauses
run() :-
Program = "theProgram.exe",
Exe = useExe::new(Program),
Exe:run(),
Exe:wait(),
stdio::writef("% terminated (%x08)", Program, Exe:exitCode).
Regards Thomas Linder Puls
PDC
PDC
-
- Posts: 9
- Joined: 13 Feb 2024 9:17
Re: Migration vp 8 to vp 11, createProcess retired entity
ok perfect thank you.
but should we not free the object or close it with exe:close() or something else?
but should we not free the object or close it with exe:close() or something else?
-
- VIP Member
- Posts: 1466
- Joined: 28 Feb 2000 0:01
Re: Migration vp 8 to vp 11, createProcess retired entity
Yes, it is a good idea to close the useExe object when you are done with it.
(But strictly speaking it is not necessary because the useExe objects have a finalize predicate that will close them).
(But strictly speaking it is not necessary because the useExe objects have a finalize predicate that will close them).
Regards Thomas Linder Puls
PDC
PDC