The operation completed successfully

May 20, 2008
9,553
64
Syracuse, NY, USA
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.
 
May 20, 2008
9,553
64
Syracuse, NY, USA
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.
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.
 
May 20, 2008
9,553
64
Syracuse, NY, USA
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.