Added user_data to the request callback and added handling of exporting API's for C++.