This patch implements (with a basic sanity check) a behaviour of ImmReleaseContext() function as described in msdn and in the way ImmGetContext() has already been impleneted.