Changeset 731
- Timestamp:
- 12/6/2008 2:26:19 AM (4 years ago)
- File:
-
- 1 edited
-
branches/eraser6/ShellExt/CtxMenu.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/ShellExt/CtxMenu.cpp
r730 r731 407 407 408 408 //Build the command line 409 std::wstring commandAction; 409 410 std::wstring commandLine; 410 411 HRESULT result = E_INVALIDARG; … … 414 415 { 415 416 //Add Task command. 416 command Line = L"addtask";417 commandAction = L"addtask"; 417 418 418 419 //See the invocation context: if it is executed from the recycle bin … … 420 421 if (InvokeReason == INVOKEREASON_RECYCLEBIN) 421 422 { 422 commandLine += L"-r";423 commandLine = L"-r"; 423 424 } 424 425 else … … 449 450 { 450 451 //We want to add a new task 451 command Line = L"addtask";452 commandAction = L"addtask"; 452 453 453 454 //Add every item onto the command line … … 455 456 i != SelectedFiles.end(); ++i) 456 457 { 457 commandLine += L"\"-u=" + *i + ",clusterTips\" ";458 commandLine += L"\"-u=" + *i + L",clusterTips\" "; 458 459 } 459 460 … … 503 504 ZeroMemory(&processInfo, sizeof(processInfo)); 504 505 505 std::wstring finalCommandLine(L"\"" + eraserPath + L"\" " + commandLine); 506 wchar_t* buffer = new wchar_t[finalCommandLine.length() + 1]; 507 wcscpy_s(buffer, finalCommandLine.length() + 1, finalCommandLine.c_str()); 506 std::wostringstream finalCmdLine; 507 finalCmdLine << L"\"" << eraserPath << L"\" \"" << commandAction 508 << L"\" -q " << commandLine; 509 std::wstring cmdLine(finalCmdLine.str()); 510 wchar_t* buffer = new wchar_t[cmdLine.length() + 1]; 511 wcscpy_s(buffer, cmdLine.length() + 1, cmdLine.c_str()); 508 512 509 513 if (!CreateProcess(NULL, buffer, NULL, NULL, false, CREATE_NO_WINDOW,
Note: See TracChangeset
for help on using the changeset viewer.
