Man, it's been ages since I posted in this forum... ^^
Anyhow, I've been toying with the plugin API and I think I found a bug in MB_GetWindowHandle. When this delegate is called e.g. in response to the PluginStartup notification, the call is running on a background thread where MusicBee can't query the main Form's handle:
bei System.Windows.Forms.Control.get_Handle()
bei #=qzjQScvhaxDGgseRKuAhV_kELbKEcrC_gcOcNkdsp1mc=.#=qrVSCRWSBIFxMCO4aVHPWuKX_K15AMOs2Pj2p4C4EKR0=()
bei MusicBeePlugin.MusicBeeAPI.get_MainWindow()
bei TestPlugin.TestPlugin.OnPluginStartup()
Ah, isn't .NET lovely... ;)