(Reuters) - Hewlett-Packard Co and its former chief executive, Mark Hurd, have won dismissal of a lawsuit that challenged the computer maker's public commitment to ethics at a time when Hurd was allegedly engaging in sexual harassment.