It should not be taking a pointer to MsgBoxHandle. Also changed the type of MsgBoxHandle to prevent similar bugs.