Yes, currently MCI_MapMsgAtoW returns a tri-state. -1 = Memory allocation error 0 = No unmap required 1 = Unmap required.
Since MCI_UnmapMsgAtoW handles all the cases where MCI_MapMsgAtoW allocates memory. Why not just call MCI_UnmapMsgAtoW to do its thing in all cases?