A convenience method which opens an extension of the given type, and yields it to a callback. A handle is opened
if needed by the extention, and closed before returning to the caller.
A convenience method which opens an extension of the given type, yields it to a callback, and returns the result
of the callback. A handle is opened if needed by the extension, and closed before returning to the caller.