Changeset 321:a3b84f877e63 for dwt/dnd/Transfer.d
- Timestamp:
- 11/03/08 16:14:46 (2 months ago)
- Files:
-
- dwt/dnd/Transfer.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
dwt/dnd/Transfer.d
r320 r321 15 15 16 16 import dwt.internal.win32.OS; 17 import dwt.internal.ole.win32.COM; 17 18 18 19 import dwt.dnd.TransferData; 19 20 import dwt.dwthelper.utils; 21 import dwt.internal.ole.win32.OBJIDL; 22 static import tango.core.Thread; 20 23 21 24 /** … … 45 48 * message sends. 46 49 */ 47 int getData(IDataObject dataObject, FORMATETC pFormatetc, STGMEDIUMpmedium) {50 int getData(IDataObject dataObject, FORMATETC* pFormatetc, STGMEDIUM* pmedium) { 48 51 if (dataObject.GetData(pFormatetc, pmedium) is COM.S_OK) return COM.S_OK; 49 try { Thread.sleep(0.050);} catch (Exception t) {}52 try {tango.core.Thread.Thread.sleep(0.050);} catch (Exception t) {} 50 53 int result = dataObject.GetData(pFormatetc, pmedium); 51 54 int retryCount = 0; 52 55 while (result !is COM.S_OK && retryCount++ < RETRY_LIMIT) { 53 MSG msg = new MSG();54 OS.PeekMessage( msg, 0, 0, 0, OS.PM_NOREMOVE | OS.PM_NOYIELD);55 try { Thread.sleep(0.050);} catch (Exception t) {}56 MSG msg; 57 OS.PeekMessage(&msg, null, 0, 0, OS.PM_NOREMOVE | OS.PM_NOYIELD); 58 try {tango.core.Thread.Thread.sleep(0.050);} catch (Exception t) {} 56 59 result = dataObject.GetData(pFormatetc, pmedium); 57 60 }
