When you've written the DLLs, can't you just place breakpoints in their functions and check what they return? Normally you should be able this way to find and fix bugs of this kind in a couple of minutes.