Beware of that mistake! RRS feed

  • General discussion

  • Here's a piece of code that crashes shell INSTANTLY:

    si.cbSize = sizeof(SHELLEXECUTEINFO);
    si.fMask = SEE_MASK_FLAG_NO_UI;
    si.lpVerb = L"Open";
    si.lpFile = L"\\Windows\\remnet.exe";
    si.nShow = SW_SHOW;

    It's an obvious mistake (SEE_MASK_FLAG_NO_UI flag vs. SW_SHOW), but it shouldn't crash the whole shell!
    Flags should be taken into consideration first, then the nShow parameter.

    Do(n't) try this bug at home ;).

    If You'll find my answer satisfactory or helpful - mark it as answered or vote for it! Thank You.
    "If You think You know better then me, why is Your code not working, then don't waste my time at this forum. Otherwise - do as I'm suggesting."
    Monday, October 5, 2009 11:23 AM