I don't know if it is actually possible, but if so then could someone give an example of how to expose a method returning std::auto_ptr<T>? The only way I'm able to achieve it is to write a thin wrapper returning T*. Thanks, Jarda.