Mercurial > projects > dwt2
comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/dnd/RTFTransfer.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 public void javaToNative (Object object, TransferData transferData){ | 78 public void javaToNative (Object object, TransferData transferData){ |
79 if (!checkRTF(object) || !isSupportedType(transferData)) { | 79 if (!checkRTF(object) || !isSupportedType(transferData)) { |
80 DND.error(DND.ERROR_INVALID_DATA); | 80 DND.error(DND.ERROR_INVALID_DATA); |
81 } | 81 } |
82 // CF_RTF is stored as a null terminated byte array | 82 // CF_RTF is stored as a null terminated byte array |
83 String string = (cast(ArrayWrapperString)object).array; | 83 String string = stringcast(object); |
84 wchar* chars = StrToWCHARz(string); | 84 LPCWSTR chars = StrToWCHARz(string); |
85 int codePage = OS.GetACP(); | 85 int codePage = OS.GetACP(); |
86 int cchMultiByte = OS.WideCharToMultiByte(codePage, 0, chars, -1, null, 0, null, null); | 86 int cchMultiByte = OS.WideCharToMultiByte(codePage, 0, chars, -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; |