API:ClearHasMsg/Sample code 1