just came across this. don't know if you've figured it out yet but I'll help you out anyway.
Its hard for me to tell what is causing the problem without seeing some code, so I'll just give you a quick rundown of what you should be doing to make it run correctly. Some of this probably is obvious but I'll say it anyway.
Make sure every function in the dll that you are going to use has the dll export and import statements in your dll and main app. Secondly, for what you are saying, this is how it should work.
In the main application
temp variable = 1st dll function();
2nd dll function(temp variable);
That's all there is to it.