made small adjustments based on changes in api
copied samples from the main project branch.
samples tested under windows x64 and osx