What is the difference between CreateProcess and CreateProcessA?

What is the difference between CreateProcess and CreateProcessA, are there any alternatives to this in VC ++ 2008?

I also have a problem that I use the CreateProcessA function, this works well on one system, but does not work on other systems.

Also, when I use CreateProcess, I get that the error cannot convert 2 parameters from "CHAR [40]" to "LPWSTR". I'm in unicode mode

+3
source share
2 answers

First, CreateProcess is a macro that switches between CreateProcessA and CreateProcessW, which accepts strings in ANSI or Unicode, respectively. It depends on your project build settings (character set project properties), Unicode vs Multi-Byte. Typically, you want everything to be in Unicode, as this allows for globalization and adds the ability to provide more supported languages.

A complaint when converting from char to LPCWSTR indicates that it expects a type of WSTR, or a string with wide strings or unicode. A workaround is to declare your characters using the _T ("blahblah") macro.

+7
source

CreateProcess CreateProcessA ( "ANSI" ), CreateProcessW ( " " ), , unicode.

, , , ANSI (8- ) unicode (16- ).


, ShellExecuteEx.

+3

Source: https://habr.com/ru/post/1750472/


All Articles