yunhaid, take a look here:
https://wiki.mobileread.com/wiki/E-book_conversion
the lrs2lrf is the tool i'm using to compile lrs source files into BBeB books. It makes use of the zylog dll, which oyu can also access directly. However, I don't know the headers to it or anything like that. I also used the lrf2lrs tool to see examples of sources files. I typically decompiled books made in bookcreator. There's also a full BBeB spec in another thread.