Hi all.

I'm trying to write this code from an old WinAPI C++ book (code snippet Image at the bottom) into a new C++ project. What it does is create a clone process. But when i code it into VS 2022, I get the error:
Code:
"Argument of type "TCHAR *" is incompatible with parameter of type "char *" "
at line-17 (sprintf, 1st arg, below code). What's causing this please? And how to fix it?

Data type error when converting an old WinAPI C++ code as a new VS 2022 C++ project-2022-10-14-14-26-37-jpg

VS 2022

Data type error when converting an old WinAPI C++ code as a new VS 2022 C++ project-2022-10-14-14-16-18-jpg

VC 6.0