comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/dnd/URLTransfer.d @ 43:b98647bc0aef

swt win compiles for d2+phobos
author Frank Benoit <benoit@tionex.de>
date Wed, 25 Mar 2009 17:08:05 +0100
parents 4c0057e71936
children
comparison
equal deleted inserted replaced
42:63aa48e5430f 43:b98647bc0aef
78 if (!checkURL(object) || !isSupportedType(transferData)) { 78 if (!checkURL(object) || !isSupportedType(transferData)) {
79 DND.error(DND.ERROR_INVALID_DATA); 79 DND.error(DND.ERROR_INVALID_DATA);
80 } 80 }
81 transferData.result = COM.E_FAIL; 81 transferData.result = COM.E_FAIL;
82 // URL is stored as a null terminated byte array 82 // URL is stored as a null terminated byte array
83 String url = (cast(ArrayWrapperString)object).array; 83 String url = stringcast(object);
84 int codePage = OS.GetACP(); 84 int codePage = OS.GetACP();
85 wchar[] chars = StrToWCHARs(codePage, url, true ); 85 String16 chars = StrToWCHARs(codePage, url, true );
86 int cchMultiByte = OS.WideCharToMultiByte(codePage, 0, chars.ptr, -1, null, 0, null, null); 86 int cchMultiByte = OS.WideCharToMultiByte(codePage, 0, chars.ptr, -1, null, 0, null, null);
87 if (cchMultiByte is 0) { 87 if (cchMultiByte is 0) {
88 transferData.stgmedium = new STGMEDIUM(); 88 transferData.stgmedium = new STGMEDIUM();
89 transferData.result = COM.DV_E_STGMEDIUM; 89 transferData.result = COM.DV_E_STGMEDIUM;
90 return; 90 return;