if (COM.OleFlushClipboard() != COM.S_OK) {
int result = COM.OleFlushClipboard();  if (result != COM.S_OK) { MSG msg = new MSG(); COM.PeekMessage (msg, 0, 0, 0, OS.PM_NOREMOVE); result = COM.OleFlushClipboard(); } if (result != COM.S_OK) {
public void setContents(Object[] data, Transfer[] dataTypes) {	checkWidget();	if (data == null || dataTypes == null || data.length != dataTypes.length) {		DND.error(SWT.ERROR_INVALID_ARGUMENT);	}		this.data = data;	this.transferAgents = dataTypes;	if (COM.OleSetClipboard(this.iDataObject.getAddress()) != COM.S_OK ) {		DND.error(DND.ERROR_CANNOT_SET_CLIPBOARD);	}	if (COM.OleIsCurrentClipboard(this.iDataObject.getAddress()) != COM.S_OK) {		DND.error(DND.ERROR_CANNOT_SET_CLIPBOARD);	}	if (COM.OleFlushClipboard() != COM.S_OK) {		DND.error(DND.ERROR_CANNOT_SET_CLIPBOARD);	}	this.data = new Object[0];	this.transferAgents = new Transfer[0];}