Thanks for your reply. I've now found the problem (facepalm).
I was certain I was using the correct (5.2) dlls, and I think that the fact that everything was compiling ok made me think I didn't need to check that - even though I suspected some kind of mismatch.
Anyway, it turns out that I had the wrong dlls. After many many hours of confusion the answer was in the end elsewhere. Now it works fine.
Thanks again and sorry for the noise!
Bookmarks