Hello I have the following code but it isn\'t working as expected, can\'t figure out what the problem is.
Basically, I\'m executing a process (a .NET process) and pa
You are not allocating memory for your string.
Instead of:
LPTSTR cmdArgs = "name@example.com";
try:
TCHAR cmdArgs[] = "name@example.com";
Edit: then call:
CreateProcess("D:\\email\\smtp.exe", &cmdArgs[0], ...
This will create a local array on the stack and then pass a pointer to that array.