locked
ShellExecuteExW return error code 1223 RRS feed

  • Question

  • Hello,

    What's the possible result of error code 1223 () of the following code? (Except correctness of the parameters).

    	SHELLEXECUTEINFOW sei = { sizeof(sei) }; 
    	sei.lpFile = path.c_str(); 
    	sei.lpParameters = params.c_str();
    	sei.hwnd = NULL; 
    	sei.nShow = SW_NORMAL;  
    	sei.fMask = SEE_MASK_NOASYNC;
     
    	if (ShellExecuteExW(&sei)) 
    	{ 
    		return true;
    	} 

    Thanks in advance,

    szulak

    Thursday, August 7, 2014 6:16 PM

Answers

  • I've solved it, it was Windows Defender preventing me to launch an executable. Thank you guys.
    • Marked as answer by aszulak Thursday, August 7, 2014 7:29 PM
    Thursday, August 7, 2014 7:28 PM

All replies

  • 1223 would be ERROR_CANCELLED "The operation was canceled by the user." Presumably, ShellExecuteEx call displayed some kind of UI that allowed the user to cancel the operation.

    What is it you are trying to run?


    Igor Tandetnik

    Thursday, August 7, 2014 7:23 PM
  • I've solved it, it was Windows Defender preventing me to launch an executable. Thank you guys.
    • Marked as answer by aszulak Thursday, August 7, 2014 7:29 PM
    Thursday, August 7, 2014 7:28 PM