For work I have to code with an external company's API to deal with their proprietary database solution. Unfortunately the documentation they provide is more of an example guide then proper API docs, so it is very light on nitty gritty details like error codes, method returns, and exceptions.
So for instance, a class will have a .GetErrorCode()
method, but I have no idea what those error numbers mean because they didn't document what number matches up with what error. In many cases a method will return an Object, with no documentation of what the type of Object it actually returns. I have asked them repeatedly for proper documentation but they seem to think details like the ones above are propriety secrets. So, is there any tools or methods I can work around my limited or in some cases non-existent documentation.
Please note that I am using Visual Studio 2005 and coding in C# under .Net.
And before anyone answers, "don't use the API", I have to, it is for work.
A nasty scenario. I hate to suggest it, but maybe reflector is your friend if it isn't obfuscated. There may be some IP issues, but in this case reversing it seems the only viable way of finding out what the API is. However, I suspect (from methods like .GetErrorCode()) that this is a shim on top of P/Invoke - in which case even reflector will just show you lots of external calls...
The main other thing I can say is: write lots of unit tests that cover how you are trying to use it... that way if you guess wrong and something changes, you'll know early.