PTL logo

From: Lorenzo Dematté (dematte_at_[hidden])
Date: 2008-07-03 09:20:21


Are you compiling for Unicode?
If so, unicode string constants are L"" (notice the L).
Or you can use the TEXT macro.
In any case if you get things right the cast is not required.

Also, if I'm not wrong, the command line should be passed in another param.
However, this is an MPI.NET list, you should look up on MSDN for this
questions or asks in the correct forums/mailing lists.

Regards,
Lorenzo

Qi Zhu wrote:
> Hi, Lorenzo,
>
> Thanks for your email. I did tried that, like say,
>
> CreateProcess(NULL,
>
> const_cast<LPCWSTR>("mpiexec -n 3"), NULL, NULL, FALSE, 0, NULL, NULL,
> &si, &pi); or
> CreateProcess(const_cast<LPCWSTR>("mpiexec -n 3"), NULL,NULL, NULL,
> FALSE, 0, NULL, NULL, &si, &pi);
> However, the compiler complains that:
> error C2440: 'const_cast' : cannot convert from 'const char [13]' to
> 'LPCWSTR'
> Types pointed to are unrelated; conversion requires reinterpret_cast,
> C-style cast or function-style cast
>
>
> By the way, I am using VS2005. Thanks.
>
>
>
>
>
>
> On 7/3/08, *Lorenzo Dematté* <dematte_at_cosbi.eu> wrote:
>
> Is it a standard Win32 C++ program? Use CreateProcess...
> Lorenzo
>
>
> Qi Zhu wrote:
>
>
> Hi, Everyone,
>
> I am working on a parallel project and the code requires me to
> invoke mpiexec command with argument in a dll. Is there anyone
> who can share some experience about it?
>
> Which system call may I use in C++?
>
> Thanks.
> --
> Thanks and Regards
> Sincerely Yours
> Jeffrey
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mpi.net <http://mpi.net/> mailing list
> mpi.net <http://mpi.net/>@osl.iu.edu <http://osl.iu.edu/>
> http://www.osl.iu.edu/mailman/listinfo.cgi/mpi.net
>
>
>
> _______________________________________________
> mpi.net <http://mpi.net/> mailing list
> mpi.net <http://mpi.net/>@osl.iu.edu <http://osl.iu.edu/>
> http://www.osl.iu.edu/mailman/listinfo.cgi/mpi.net
>
>
>
>
> --
> Thanks and Regards
> Sincerely Yours
> Zhu Qi