Monday, August 15, 2011

Third Party DLL random thoughts ...

I'm always very happy then a third party dll or SDK comes with a code sample, in any language. I think this is the best what developers can do to ensure that users of their libraries will not have problems. It helped me a number of times (Oh, so I have to pass THIS to the function ... why didn't they mention it in the manual?).

But I like it a bit less when the code comes as a neat Visual Studio solution which no one obviously tested to make sure it compiles.

So I made an empty header file bc_Content_Decoder_Constants.h and added it to the project and commented out the body of a function that used the constants from the header.

Now I'm up to the next challenge: I can run the application in release mode, but not in debug mode.

Looks a bit vague.

I spent a while playing with linker settings and application manifest, but eventually ended up debugging the application in my head. In this particular case it was not as hard as it may sound - just looked at what functions were called in what sequence and duplicated that in my C# "throwaway" app and found a workaround to my problem. Sill, sample code from the third party was better than nothing.

by . Also posted on my website

No comments: