This function returns a message-dependent value. For more information, see the Windows SDK documentation for the specific appbar message sent. Links to those documents are given in the See Also section.
Returns TRUE if successful; otherwise, FALSE.
The documentation doesn't provide any useful information about
why the call might fail.
According to
this SO answer[
^], an older version of the documentation said that you have to pass the
hWnd
of the
Shell_TrayWnd
window as well as the
cbSize
; maybe older versions of Windows required that?
But since you haven't told us what error you're getting, we can only guess at this point.