example code and lib file for embed