Dobi,
Please post the dll. I cannot run your code without it.
Also, the problem may be that you cannot call this twice, without first 'closing' the device. You may be trying to use resources that are already in use. This would be the same as opening a daq session that is already in use.
Try that, and if you can't get it working still, post the code or some more information.
Good luck