Improved dll interaction