Fix some bugs in export APIs.
Add CLR Adapter.