This is the first "Ask a developer Monday" in which we try answer the number one question we received in the past weeks. And that question is: "How can I use TitanEngine as a static library?"
Even though the TitanEngine is mostly been used as a dynamic library in our sample unpackers it can also be used as a static library. First sample that uses our engine a static library we made isTitaniumOverlay whose source will be available with the next update. Here is how we did it...
First step is to create new library files which contains the actual TitanEngine code so that the functions you use can be linked directly into your code. To do this open TitanEngine project with Visual Studio and go to Project -> TitanEngine properties (Or just hit ALT+F7). In the Configuration Properties -> General -> Configuration type select Static Library (.lib).
Once you select this setting next compile will generate a new .lib file inside the release folder which will be used as a substitute for existing .lib file you used in the past. For your new project copy SDK.h and this new TitanEngine.lib to your project folder and include them in the usual way. One thing to worry about is that in your project you can't use the same function names which have already been used in the TitanEngine. So the only problem you can have is if you are creating a new DLL project you can't use function named DllMain. That can be resolved by renaming DllMain to any other name and setting the option Linker -> General -> EntryPoint to that function name.
Until next time and next ask a developer Monday...