Implement two functions for supporting IDispatch.