(Reuters) - Hewlett-Packard Co has won the dismissal of a lawsuit accusing the computer maker of securities fraud for misleading shareholders about its commitment to ethics while its chief executive was allegedly engaging in sexual harassment.