In AppBarFunctions.cs:137 you are assigning the return value of ABM_NEW to ret but not using it anywhere in the code:
var ret = Interop.SHAppBarMessage((int)Interop.ABMsg.ABM_NEW, ref abd);
Consider using ret info.IsRegistered to determine whether the registration succeeded and if not, omit ABSetPos() (Which then would overlay other windows / bars)
The return value of SHAppBarMessage(ABM_NEW, ref pData) is described in MSDN - ABM_NEW message:
Return value
Returns TRUE if successful, or FALSE if an error occurs or if the appbar is already registered.
In AppBarFunctions.cs:137 you are assigning the return value of
ABM_NEWtoretbut not using it anywhere in the code:var ret = Interop.SHAppBarMessage((int)Interop.ABMsg.ABM_NEW, ref abd);Consider using
retinfo.IsRegisteredto determine whether the registration succeeded and if not, omitABSetPos()(Which then would overlay other windows / bars)The return value of
SHAppBarMessage(ABM_NEW, ref pData)is described in MSDN - ABM_NEW message: