G
Guest
I'm using Vs2002 .net framvwork sp3
I need to rerun my exe
I use that:
PROCESS_INFORMATION pi;
STARTUPINFO si;
memset( &pi, 0, sizeof(PROCESS_INFORMATION) );
memset(&si, 0, sizeof(STARTUPINFO));
si.cb= sizeof(STARTUPINFO);
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_SHOWNA ;
si.lpDesktop = "";
CreateProcess( NULL,
Assembly::GetExecutingAssembly()->Location,
NULL,
NULL,
FALSE,
NORMAL_PRIORITY_CLASS,
NULL,
NULL,
&si,
&pi );
and i receive the following error
unable to convert parameter 2 from system::string__gc* to LPSTR
If i Put in the second parameter (char*))"progpath and name" all works!!
If i run
Console::writeline(S"location{0{ =
",Assembly::GetExecutingAssembly()->Location
I view the correct path
That's a conversion Problem i thing but i don't Know how to solve
thanks best
regards
Davide
I need to rerun my exe
I use that:
PROCESS_INFORMATION pi;
STARTUPINFO si;
memset( &pi, 0, sizeof(PROCESS_INFORMATION) );
memset(&si, 0, sizeof(STARTUPINFO));
si.cb= sizeof(STARTUPINFO);
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_SHOWNA ;
si.lpDesktop = "";
CreateProcess( NULL,
Assembly::GetExecutingAssembly()->Location,
NULL,
NULL,
FALSE,
NORMAL_PRIORITY_CLASS,
NULL,
NULL,
&si,
&pi );
and i receive the following error
unable to convert parameter 2 from system::string__gc* to LPSTR
If i Put in the second parameter (char*))"progpath and name" all works!!
If i run
Console::writeline(S"location{0{ =
",Assembly::GetExecutingAssembly()->Location
I view the correct path
That's a conversion Problem i thing but i don't Know how to solve
thanks best
regards
Davide