Hello photonica,
about your last finding: Can it be that you used the downloaded vlc.exe "in combination" with your compiled .dll / plugins.dat ? This would match my observation / guss that this error happend while destructing classes or unloading the dll's or similar...
sma