The current implementation doesn't actually set the out parameter, and it returns 0 on failure instead of on success.