You need to show how you are accessing the DLL functions..
It looks to me that you are passing it strings with no Null termination and no pre-allocated
space.
The calling convention comes into play too.. but I am betting that you are giving it strings with no regard for nulls and space allocation.
Sorry, I over looked the post you gave, I'll look at it.