At a Midtown hotel ballroom on Thursday, Vice President Dick Cheney declared that the United States was “succeeding brilliantly” in Iraq and assailed Democrats on taxes, gas prices, and national security.

As the keynote speaker at the annual dinner of the New York State Republican Party at the Sheraton New York Hotel and Towers, Mr. Cheney predicted victory in November for the presumptive Republican presidential nominee, Senator John McCain of Arizona. He also criticized Democrats in Congress for refusing to extend President Bush’s tax cuts.

Reprising language from a speech he gave at the Coast Guard Academy this month, Mr. Cheney said of the war in Iraq that the “only way to lose this fight is to quit  but that would be an act of betrayal and dishonor, and that is not going to happen on our watch.”

Mr. Cheney made no mention of two controversial issues: Scott McClellan, the former White House press secretary who recently published a book sharply critical of his former colleagues in the Bush administration, and the topic of the day in New York, Gov. David A. Paterson’s decision to order state agencies to recognize same-sex marriages performed in other jurisdictions.