Hi Dermot,
I can only assume that you are using the "Call Library Function", right?
Check your parameters versus their types (ie: are you using pointers, is it the appropriate type or format, etc). Also check the calling convention (C or stdcall).
Sometimes the smallest oversight creates the biggest headaches.
Cheers,
JLV