CreateProcess doesn't pass command line arguments

前端 未结 8 2176
梦谈多话
梦谈多话 2020-12-01 10:20

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

8条回答
  •  一个人的身影
    2020-12-01 11:13

    Try this:

    LPTSTR cmdArgs = "name@example.com";
    CString szcmdline("D:\\email\\smtp.exe");
    szcmdline += _T(" ") + cmdArgs ;
    
    //Leave first param empty and pass path + argms in 
        if(CreateProcess(NULL, szcmdline, second
    

提交回复
热议问题