Festo,
What type of call do you have for the dll? WinStd or C type?....having this incorrectly selected often results in the error you are seeing.
What do you mean when you place a break point it works fine?...if you don't call the dll it works fine?...or if you give it time it works fine?
-Brett