CreateProcess( NULL, this->checkedListBox1->Items[0]->ToString(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)
error C2664: 'CreateProcessW' : cannot convert parameter 2 from 'System::String ^' to 'LPWSTR'
и что с ним делать?
STARTUPINFO si;
static PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
CreateProcessW( NULL, TEXT("D:\\Project1.exe"), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi )
System::String *s = new String(this->checkedListBox1->Items[0]->ToString());Как-то так?
const wchar_t __pin *s = PtrToStringChars(s);
CreateProcess( NULL, s, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi )
System::String ^s = gcnew System::String(this->checkedListBox1->Items[0]->ToString());
array<char> ^chArr = s->ToCharArray();
LPWSTR lpArr = new WCHAR[chArray->Length];
System::Runtime::InteropServices::Copy(chArr, 0, IntPtr(lpArr), chArr->Length);
// дальше можно использовать lpArr
// в конце не забываем удалить
delete [] lpArr;