1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

The operation completed successfully

Discussion in 'Support' started by vefatica, Sep 22, 2012.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,938
    Likes Received:
    30
    If, during the delay (see below), I make a window other than TCMD the foreground window, I get
    Code:
    v:\> delay 5 & activate "TC 14.0 - 14.02  [2160]  v:\" /pos=0,0,800,600
    TCC: (Sys) The operation completed successfully.
    "TC 14.0 - 14.02  [2160]  v:\"
    The window is moved and sized but not activated (no surprise since MS has really screwed up foreground/focus in Win7). But the (non-)error message seems inappropriate.
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    It's coming from Windows, not TCC. Windows is reporting an API failure, TCC asks for the extended error info, and Windows says there isn't any.
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,938
    Likes Received:
    30
    I see this too in trying to implement a MOVEWIN plugin. For me, it's coming from FindWindow(). A "community addition" to the MS docs for FindWindow() warns:
    Code:
    Note that a return value of NULL with a GetLastError() of ERROR_SUCCESS indicates that there are no top-level windows matching the search criteria. 
     
  4. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,938
    Likes Received:
    30
    Another place where this happens (sometimes!) is with SetForegroundWindow(). If the Windows no_steal_focus mechanism prevents SetForegroundWindow() (making it fail), GetLastError() can be ERROR_SUCCESS.
     

Share This Page