@Vadim:
1. Do you define your dll function as "function DllFunction();" instead of "dllfunction DllFunction();"?
2. Try to call the function in your Dll with and without "()" at the end! I can't explain why but it makes a difference!

Had the same problems some days ago