Mercurial > projects > dwt-win
diff dwt/internal/ole/win32/COM.d @ 212:ab60f3309436
reverted the char[] to String and use the an alias.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:12:38 +0200 |
parents | fa7d7d66b9ed |
children | 36f5cb12e1a2 |
line wrap: on
line diff
--- a/dwt/internal/ole/win32/COM.d Sat Apr 26 10:01:48 2008 +0200 +++ b/dwt/internal/ole/win32/COM.d Mon May 05 00:12:38 2008 +0200 @@ -24,13 +24,14 @@ private import dwt.internal.ole.win32.extras; private import dwt.internal.ole.win32.ifs; private import dwt.internal.ole.win32.COMAPI; +import dwt.dwthelper.utils; private alias dwt.internal.ole.win32.COMAPI COMAPI; public import dwt.internal.win32.OS; -template IIDFromStringT(char[] g) { +template IIDFromStringT(String g) { static if (g.length == 38) const GUID IIDFromStringT = IIDFromStringT!(g[1..$-1]); else static if (g.length == 36) @@ -103,7 +104,7 @@ //public static const GUID IIDIExternalConnection = IIDFromStringT!("{00000019-0000-0000-C000-000000000046}"); //$NON-NLS-1$ public static const GUID IIDIFont = IIDFromStringT!("{BEF6E002-A874-101A-8BBA-00AA00300CAB}"); //$NON-NLS-1$ //public static const GUID IIDIFontDisp = IIDFromStringT!("{BEF6E003-A874-101A-8BBA-00AA00300CAB}"); //$NON-NLS-1$ - public static const /*GUID*/ char[] IIDIHTMLDocumentEvents2 = /*IIDFromStringT!(*/"{3050F613-98B5-11CF-BB82-00AA00BDCE0B}"/*)*/; + public static const /*GUID*/ String IIDIHTMLDocumentEvents2 = /*IIDFromStringT!(*/"{3050F613-98B5-11CF-BB82-00AA00BDCE0B}"/*)*/; public static const GUID IIDIInternetSecurityManager = IIDFromStringT!("{79eac9ee-baf9-11ce-8c82-00aa004ba90b}"); //$NON-NLS-1$ //public static const GUID IIDILockBytes = IIDFromStringT!("{0000000A-0000-0000-C000-000000000046}"); //$NON-NLS-1$ //public static const GUID IIDIMalloc = IIDFromStringT!("{00000002-0000-0000-C000-000000000046}"); //$NON-NLS-1$ @@ -441,7 +442,7 @@ // alias dwt.internal.ole.win32.comapi. -// public static GUID* IIDFromString(char[] lpsz) { +// public static GUID* IIDFromString(String lpsz) { // GUID* lpiid = new GUID(); // if (COM.IIDFromString(Converter.StrToWCHARz(lpsz), lpiid) == COM.S_OK) // return lpiid; @@ -853,10 +854,10 @@ */ // BSTR is aliased to wchar* // Note : Free the "bstr" memory if freeTheString is true, default false -char[] BSTRToStr( /*BSTR*/ inout wchar* bstr, bool freeTheString = false){ +String BSTRToStr( /*BSTR*/ inout wchar* bstr, bool freeTheString = false){ if(bstr is null) return null; int size = (SysStringByteLen(bstr) + 1)/wchar.sizeof; - char[] result = WCHARzToStr(bstr, size); + String result = WCHARzToStr(bstr, size); if(freeTheString) { // free the string and set ptr to null SysFreeString(bstr);