but it doesn't fail consistently in the same place
that´s exactly what i experience too! The general approach seems to be sound, because it´s PB equivalent works. I have several implementations of it running for years now without any problem.
This erratic behavior makes me think of memory corruption - but how and where? In PB i don´t have to initialize the common controls and i don´t have to call coinitialize because PB does it for me, the rest is more or less the same. To my (limited) experience COM seems to be much more sensitive to improper arguments compared to the Windows API. That is, it is much easier to crash an app by passing wrong arguments to a COM object than to the Windows API (even if it is possible there too).
With unicode defined it runs for 32 bit, as soon as you don´t define it, the problems begin. COM needs wide strings, i account for this. Maybe a problem with the include files ?
The FreeBASIC sample code (examples\win32\COM\MoviePlayer) doesn´t compile, it throws a linker error i don´t understand, so no help either...
So as far as you can tell, there isn´t a fundamental error in my implementation of COM in my code ?
JK