IContextMenu.InvokeCommand() no longer works asynchronous on Windows 7

Unanswered IContextMenu.InvokeCommand() no longer works asynchronous on Windows 7

  • Wednesday, April 20, 2011 2:16 PM
     
     

    Hi there.

    I used to execute shell operations like copy, paste or delete on files and folders using IContextMenu.InvokeCommand() in my application for years. Usually these operations were executed asynchronously, but on Windows 7 InvokeCommand() is blocking my application while the operation is executed. I verified that the same executebale behaves differently on Windows XP, here the Windows Shell seems to spin off a seperate thread for the operation. Adding CMIC_MASK_ASYNCOK to CMINVOKECOMMANDINFO.fMask does not make any difference.

    Does anybody know a trick how to get back the old async behavior of Windows XP also on Windows 7?

    Best regards,

    Joachim

All Replies

  • Wednesday, August 17, 2011 2:05 PM
     
     

    I have the same issue.

    In my InvokeCommand code I create a new process with CreateProcess() but I cannot get the contextual menu on an another file during the execution.

    Explorer hangs until the end of my process.

    My code is based on this example :
    http://www.codeproject.com/KB/shell/shellextguide1.aspx

    Please post if you have a solution. :)