Posted on 2006-05-15
Today i started a program that creates a new desktop and runs a program. well i got the new desktop to create and switch back after the program but i cannot get the process started. this causes the program to lock into the other desktop which is only able to be switched back by a reset. when i build in a CreateProcess it keeps telling me i need to convert char* to LPWSTR but when i LPWSTR("string"); it does compile but does not run the program, Please Help!!!
si.cb = sizeof(si);
si.lpTitle = "Test";
si.lpDesktop = "Test";
CreateProcess(NULL, "c:\\windows\\system32\\calc.exe", NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
Error 1 error C2440: '=' : cannot convert from 'const char ' to 'LPWSTR' line 63
Error 2 error C2664: 'CreateProcessW' : cannot convert parameter 2 from 'const char ' to 'LPWSTR' line 64