Mercurial > projects > dwt2
comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/ole/win32/COM.d @ 112:9f4c18c268b2
Update to compile and execute with dmd 2.052.
author | kntroh |
---|---|
date | Wed, 16 Mar 2011 21:53:53 +0900 |
parents | d46287db17ed |
children | 536e43f63c81 |
comparison
equal
deleted
inserted
replaced
111:b6e9904989ed | 112:9f4c18c268b2 |
---|---|
859 * instead to determine the null ended, this mean BSTRToStr() can get string | 859 * instead to determine the null ended, this mean BSTRToStr() can get string |
860 * which has embedded null characters. | 860 * which has embedded null characters. |
861 */ | 861 */ |
862 // BSTR is aliased to wchar* | 862 // BSTR is aliased to wchar* |
863 // Note : Free the "bstr" memory if freeTheString is true, default false | 863 // Note : Free the "bstr" memory if freeTheString is true, default false |
864 String BSTRToStr( /*BSTR*/ inout wchar* bstr, bool freeTheString = false){ | 864 String BSTRToStr( /*BSTR*/ ref wchar* bstr, bool freeTheString = false){ |
865 if(bstr is null) return null; | 865 if(bstr is null) return null; |
866 int size = (SysStringByteLen(bstr) + 1)/wchar.sizeof; | 866 int size = (SysStringByteLen(bstr) + 1)/wchar.sizeof; |
867 String result = WCHARzToStr(bstr, size); | 867 String result = WCHARzToStr(bstr, size); |
868 if(freeTheString) { | 868 if(freeTheString) { |
869 // free the string and set ptr to null | 869 // free the string and set ptr to null |