if (COM.OleSetClipboard(this.iDataObject.getAddress()) != COM.S_OK ) {
int result = COM.OleSetClipboard(this.iDataObject.getAddress());   int retryCount = 0; while (result != COM.S_OK && retryCount++ < 10) { try { Thread.sleep(50);} catch (Throwable t) {} MSG msg = new MSG(); COM.PeekMessage (msg, 0, 0, 0, OS.PM_NOREMOVE | OS.PM_NOYIELD); result = COM.OleSetClipboard(this.iDataObject.getAddress()); } 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);	}}