The value belonging to key idKey will be replaced by hMsg. The value which has been valid before calling this function will be returned in hOldMsg and can now possible be deallocated via MBM.MsgRelease. If the value could not be refreshed or if so far no value had been entered into the Flat, CAA.gc_hINVALID will be returned.