Just a guess here but your DLL functions should have parameters declared byVal