Mercurial > projects > dwt-win
annotate 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 |
rev | line source |
---|---|
98 | 1 /******************************************************************************* |
2 * Copyright (c) 2000, 2007 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
97 | 7 * |
98 | 8 * Contributors: |
9 * IBM Corporation - initial API and implementation | |
10 * Port to the D programming language: | |
11 * Shawn Liu | |
12 * Frank Benoit <benoit@tionex.de> | |
13 *******************************************************************************/ | |
97 | 14 module dwt.internal.ole.win32.COM; |
15 | |
16 | |
98 | 17 public import dwt.internal.ole.win32.COMTYPES; |
97 | 18 private import dwt.internal.ole.win32.OAIDL; |
19 private import dwt.internal.ole.win32.OBJIDL; | |
20 private import dwt.internal.ole.win32.OLEIDL; | |
21 private import dwt.internal.ole.win32.DOCOBJ; | |
22 private import dwt.internal.ole.win32.EXDISP; | |
23 private import dwt.internal.ole.win32.MSHTMHST; | |
24 private import dwt.internal.ole.win32.extras; | |
25 private import dwt.internal.ole.win32.ifs; | |
26 private import dwt.internal.ole.win32.COMAPI; | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
134
diff
changeset
|
27 import dwt.dwthelper.utils; |
97 | 28 |
29 private alias dwt.internal.ole.win32.COMAPI COMAPI; | |
30 | |
31 | |
32 public import dwt.internal.win32.OS; | |
33 | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
134
diff
changeset
|
34 template IIDFromStringT(String g) { |
98 | 35 static if (g.length == 38) |
36 const GUID IIDFromStringT = IIDFromStringT!(g[1..$-1]); | |
37 else static if (g.length == 36) | |
38 const GUID IIDFromStringT = { | |
39 mixin("0x" ~ g[0..8]), | |
40 mixin("0x" ~ g[9..13]), | |
41 mixin("0x" ~ g[14..18]), | |
42 [ | |
43 mixin("0x" ~ g[19..21]), | |
44 mixin("0x" ~ g[21..23]), | |
45 mixin("0x" ~ g[24..26]), | |
46 mixin("0x" ~ g[26..28]), | |
47 mixin("0x" ~ g[28..30]), | |
48 mixin("0x" ~ g[30..32]), | |
49 mixin("0x" ~ g[32..34]), | |
50 mixin("0x" ~ g[34..36]) ] }; | |
51 else | |
52 static assert(false, "Incorrect format for GUID. "~g); | |
53 } | |
54 | |
55 | |
97 | 56 public class COM : OS { |
57 | |
58 //private import std.c.windows.com; | |
59 | |
60 // all the GUID | |
61 // GUIDs for Home Page Browser | |
62 | |
98 | 63 /** GUID Constants */ |
64 public static const GUID IIDJavaBeansBridge = IIDFromStringT!("{8AD9C840-044E-11D1-B3E9-00805F499D93}"); //$NON-NLS-1$ | |
65 public static const GUID IIDShockwaveActiveXControl = IIDFromStringT!("{166B1BCA-3F9C-11CF-8075-444553540000}"); //$NON-NLS-1$ | |
66 public static const GUID IIDIEditorSiteTime = IIDFromStringT!("{6BD2AEFE-7876-45e6-A6E7-3BFCDF6540AA}"); //$NON-NLS-1$ | |
67 public static const GUID IIDIEditorSiteProperty = IIDFromStringT!("{D381A1F4-2326-4f3c-AFB9-B7537DB9E238}"); //$NON-NLS-1$ | |
68 public static const GUID IIDIEditorBaseProperty = IIDFromStringT!("{61E55B0B-2647-47c4-8C89-E736EF15D636}"); //$NON-NLS-1$ | |
69 public static const GUID IIDIEditorSite = IIDFromStringT!("{CDD88AB9-B01D-426E-B0F0-30973E9A074B}"); //$NON-NLS-1$ | |
70 public static const GUID IIDIEditorService = IIDFromStringT!("{BEE283FE-7B42-4FF3-8232-0F07D43ABCF1}"); //$NON-NLS-1$ | |
71 public static const GUID IIDIEditorManager = IIDFromStringT!("{EFDE08C4-BE87-4B1A-BF84-15FC30207180}"); //$NON-NLS-1$ | |
72 public static const GUID IIDIAccessible = IIDFromStringT!("{618736E0-3C3D-11CF-810C-00AA00389B71}"); //$NON-NLS-1$ | |
73 //public static const GUID IIDIAccessibleHandler = IIDFromStringT!("{03022430-ABC4-11D0-BDE2-00AA001A1953}"); //$NON-NLS-1$ | |
74 //public static const GUID IIDIAccessor = IIDFromStringT!("{0C733A8C-2A1C-11CE-ADE5-00AA0044773D}"); //$NON-NLS-1$ | |
75 public static const GUID IIDIAdviseSink = IIDFromStringT!("{0000010F-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
76 //public static const GUID IIDIAdviseSink2 = IIDFromStringT!("{00000125-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
77 //public static const GUID IIDIBindCtx = IIDFromStringT!("{0000000E-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
78 //public static const GUID IIDIClassFactory = IIDFromStringT!("{00000001-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
79 public static const GUID IIDIClassFactory2 = IIDFromStringT!("{B196B28F-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ | |
80 public static const GUID IIDIConnectionPoint = IIDFromStringT!("{B196B286-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ | |
81 public static const GUID IIDIConnectionPointContainer = IIDFromStringT!("{B196B284-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ | |
82 //public static const GUID IIDICreateErrorInfo = IIDFromStringT!("{22F03340-547D-101B-8E65-08002B2BD119}"); //$NON-NLS-1$ | |
83 //public static const GUID IIDICreateTypeInfo = IIDFromStringT!("{00020405-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
84 //public static const GUID IIDICreateTypeLib = IIDFromStringT!("{00020406-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
85 //public static const GUID IIDIDataAdviseHolder = IIDFromStringT!("{00000110-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
86 public static const GUID IIDIDataObject = IIDFromStringT!("{0000010E-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
87 public static const GUID IIDIDispatch = IIDFromStringT!("{00020400-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
88 public static const GUID IIDIDocHostUIHandler = IIDFromStringT!("{BD3F23C0-D43E-11CF-893B-00AA00BDCE1A}"); //$NON-NLS-1$ | |
89 public static const GUID IIDIDocHostShowUI = IIDFromStringT!("{C4D244B0-D43E-11CF-893B-00AA00BDCE1A}"); //$NON-NLS-1$ | |
90 public static const GUID IIDIDropSource = IIDFromStringT!("{00000121-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
91 public static const GUID IIDIDropTarget = IIDFromStringT!("{00000122-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
92 //public static const GUID IIDIEnumConnectionPoints = IIDFromStringT!("{B196B285-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ | |
93 //public static const GUID IIDIEnumConnections = IIDFromStringT!("{B196B287-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ | |
94 public static const GUID IIDIEnumFORMATETC = IIDFromStringT!("{00000103-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
95 //public static const GUID IIDIEnumMoniker = IIDFromStringT!("{00000102-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
96 //public static const GUID IIDIEnumOLEVERB = IIDFromStringT!("{00000104-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
97 //public static const GUID IIDIEnumSTATDATA = IIDFromStringT!("{00000105-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
98 //public static const GUID IIDIEnumSTATSTG = IIDFromStringT!("{0000000D-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
99 //public static const GUID IIDIEnumString = IIDFromStringT!("{00000101-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
100 //public static const GUID IIDIEnumUnknown = IIDFromStringT!("{00000100-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
101 public static const GUID IIDIEnumVARIANT = IIDFromStringT!("{00020404-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
102 //public static const GUID IIDIErrorInfo = IIDFromStringT!("{1CF2B120-547D-101B-8E65-08002B2BD119}"); //$NON-NLS-1$ | |
103 //public static const GUID IIDIErrorLog = IIDFromStringT!("{3127CA40-446E-11CE-8135-00AA004BB851}"); //$NON-NLS-1$ | |
104 //public static const GUID IIDIExternalConnection = IIDFromStringT!("{00000019-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
105 public static const GUID IIDIFont = IIDFromStringT!("{BEF6E002-A874-101A-8BBA-00AA00300CAB}"); //$NON-NLS-1$ | |
106 //public static const GUID IIDIFontDisp = IIDFromStringT!("{BEF6E003-A874-101A-8BBA-00AA00300CAB}"); //$NON-NLS-1$ | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
134
diff
changeset
|
107 public static const /*GUID*/ String IIDIHTMLDocumentEvents2 = /*IIDFromStringT!(*/"{3050F613-98B5-11CF-BB82-00AA00BDCE0B}"/*)*/; |
98 | 108 public static const GUID IIDIInternetSecurityManager = IIDFromStringT!("{79eac9ee-baf9-11ce-8c82-00aa004ba90b}"); //$NON-NLS-1$ |
109 //public static const GUID IIDILockBytes = IIDFromStringT!("{0000000A-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
110 //public static const GUID IIDIMalloc = IIDFromStringT!("{00000002-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
111 //public static const GUID IIDIMallocSpy = IIDFromStringT!("{0000001D-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
112 //public static const GUID IIDIMarshal = IIDFromStringT!("{00000003-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
113 //public static const GUID IIDIMessageFilter = IIDFromStringT!("{00000016-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
114 //public static const GUID IIDIMoniker = IIDFromStringT!("{0000000F-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
115 //public static const GUID IIDIOleAdviseHolder = IIDFromStringT!("{00000111-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
116 //public static const GUID IIDIOleCache = IIDFromStringT!("{0000011E-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
117 //public static const GUID IIDIOleCache2 = IIDFromStringT!("{00000128-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
118 //public static const GUID IIDIOleCacheControl = IIDFromStringT!("{00000129-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
119 public static const GUID IIDIOleClientSite = IIDFromStringT!("{00000118-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
120 public static const GUID IIDIOleCommandTarget = IIDFromStringT!("{B722BCCB-4E68-101B-A2BC-00AA00404770}"); //$NON-NLS-1$ | |
121 public static const GUID IIDIOleContainer = IIDFromStringT!("{0000011B-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
122 public static const GUID IIDIOleControl = IIDFromStringT!("{B196B288-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ | |
123 public static const GUID IIDIOleControlSite = IIDFromStringT!("{B196B289-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ | |
124 public static const GUID IIDIOleDocument = IIDFromStringT!("{B722BCC5-4E68-101B-A2BC-00AA00404770}"); //$NON-NLS-1$ | |
125 public static const GUID IIDIOleDocumentSite = IIDFromStringT!("{B722BCC7-4E68-101B-A2BC-00AA00404770}"); //$NON-NLS-1$ | |
126 public static const GUID IIDIOleInPlaceActiveObject = IIDFromStringT!("{00000117-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
127 public static const GUID IIDIOleInPlaceFrame = IIDFromStringT!("{00000116-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
128 public static const GUID IIDIOleInPlaceObject = IIDFromStringT!("{00000113-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
129 public static const GUID IIDIOleInPlaceSite = IIDFromStringT!("{00000119-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
130 public static const GUID IIDIOleInPlaceUIWindow = IIDFromStringT!("{00000115-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
131 //public static const GUID IIDIOleItemContainer = IIDFromStringT!("{0000011C-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
132 public static const GUID IIDIOleLink = IIDFromStringT!("{0000011D-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
133 public static const GUID IIDIOleObject = IIDFromStringT!("{00000112-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
134 public static const GUID IIDIOleWindow = IIDFromStringT!("{00000114-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
135 //public static const GUID IIDIParseDisplayName = IIDFromStringT!("{0000011A-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
136 //public static const GUID IIDIPerPropertyBrowsing = IIDFromStringT!("{376BD3AA-3845-101B-84ED-08002B2EC713}"); //$NON-NLS-1$ | |
137 public static const GUID IIDIPersist = IIDFromStringT!("{0000010C-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
138 public static const GUID IIDIPersistFile = IIDFromStringT!("{0000010B-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
139 //public static const GUID IIDIPersistMemory = IIDFromStringT!("{BD1AE5E0-A6AE-11CE-BD37-504200C10000}"); //$NON-NLS-1$ | |
140 //public static const GUID IIDIPersistPropertyBag = IIDFromStringT!("{37D84F60-42CB-11CE-8135-00AA004BB851}"); //$NON-NLS-1$ | |
141 public static const GUID IIDIPersistStorage = IIDFromStringT!("{0000010A-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
142 public static const GUID IIDIPersistStream = IIDFromStringT!("{00000109-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
143 public static const GUID IIDIPersistStreamInit = IIDFromStringT!("{7FD52380-4E07-101B-AE2D-08002B2EC713}"); //$NON-NLS-1$ | |
144 //public static const GUID IIDIPicture = IIDFromStringT!("{7BF80980-BF32-101A-8BBB-00AA00300CAB}"); //$NON-NLS-1$ | |
145 //public static const GUID IIDIPictureDisp = IIDFromStringT!("{7BF80981-BF32-101A-8BBB-00AA00300CAB}"); //$NON-NLS-1$ | |
146 //public static const GUID IIDIPropertyBag = IIDFromStringT!("{55272A00-42CB-11CE-8135-00AA004BB851}"); //$NON-NLS-1$ | |
147 public static const GUID IIDIPropertyNotifySink = IIDFromStringT!("{9BFBBC02-EFF1-101A-84ED-00AA00341D07}"); //$NON-NLS-1$ | |
148 //public static const GUID IIDIPropertyPage = IIDFromStringT!("{B196B28D-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ | |
149 //public static const GUID IIDIPropertyPage2 = IIDFromStringT!("{01E44665-24AC-101B-84ED-08002B2EC713}"); //$NON-NLS-1$ | |
150 //public static const GUID IIDIPropertyPageSite = IIDFromStringT!("{B196B28C-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ | |
151 public static const GUID IIDIProvideClassInfo = IIDFromStringT!("{B196B283-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ | |
152 public static const GUID IIDIProvideClassInfo2 = IIDFromStringT!("{A6BC3AC0-DBAA-11CE-9DE3-00AA004BB851}"); //$NON-NLS-1$ | |
153 //public static const GUID IIDIPSFactoryBuffer = IIDFromStringT!("{D5F569D0-593B-101A-B569-08002B2DBF7A}"); //$NON-NLS-1$ | |
154 //public static const GUID IIDIRootStorage = IIDFromStringT!("{00000012-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
155 //public static const GUID IIDIROTData = IIDFromStringT!("{F29F6BC0-5021-11CE-AA15-00006901293F}"); //$NON-NLS-1$ | |
156 //public static const GUID IIDIRpcChannelBuffer = IIDFromStringT!("{D5F56B60-593B-101A-B569-08002B2DBF7A}"); //$NON-NLS-1$ | |
157 //public static const GUID IIDIRpcProxyBuffer = IIDFromStringT!("{D5F56A34-593B-101A-B569-08002B2DBF7A}"); //$NON-NLS-1$ | |
158 //public static const GUID IIDIRpcStubBuffer = IIDFromStringT!("{D5F56AFC-593B-101A-B569-08002B2DBF7A}"); //$NON-NLS-1$ | |
159 //public static const GUID IIDIRunnableObject = IIDFromStringT!("{00000126-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
160 //public static const GUID IIDIRunningObjectTable = IIDFromStringT!("{00000010-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
161 //public static const GUID IIDISimpleFrameSite = IIDFromStringT!("{742B0E01-14E6-101B-914E-00AA00300CAB}"); //$NON-NLS-1$ | |
162 public static const GUID IIDIServiceProvider = IIDFromStringT!("{6d5140c1-7436-11ce-8034-00aa006009fa}"); //$NON-NLS-1$ | |
163 public static const GUID IIDISpecifyPropertyPages = IIDFromStringT!("{B196B28B-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$ | |
164 //public static const GUID IIDIStdMarshalInfo = IIDFromStringT!("{00000018-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
165 public static const GUID IIDIStorage = IIDFromStringT!("{0000000B-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
166 public static const GUID IIDIStream = IIDFromStringT!("{0000000C-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
167 //public static const GUID IIDISupportErrorInfo = IIDFromStringT!("{DF0B3D60-548F-101B-8E65-08002B2BD119}"); //$NON-NLS-1$ | |
168 //public static const GUID IIDITypeComp = IIDFromStringT!("{00020403-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
169 //public static const GUID IIDITypeLib = IIDFromStringT!("{00020402-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
170 public static const GUID IIDIUnknown = IIDFromStringT!("{00000000-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
171 //public static const GUID IIDIViewObject = IIDFromStringT!("{0000010D-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
172 public static const GUID IIDIViewObject2 = IIDFromStringT!("{00000127-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
173 public static const GUID CGID_DocHostCommandHandler = IIDFromStringT!("{f38bc242-b950-11d1-8918-00c04fc2c836}"); //$NON-NLS-1$ | |
174 public static const GUID CGID_Explorer = IIDFromStringT!("{000214D0-0000-0000-C000-000000000046}"); //$NON-NLS-1$ | |
175 | |
176 | |
97 | 177 |
178 /* Constants */ | |
179 //public static const int ADVF_DATAONSTOP = 64; | |
180 //public static const int ADVF_NODATA = 1; | |
181 //public static const int ADVF_ONLYONCE = 2; | |
182 //public static const int ADVF_PRIMEFIRST = 4; | |
183 //public static const int ADVFCACHE_FORCEBUILTIN = 16; | |
184 //public static const int ADVFCACHE_NOHANDLER = 8; | |
185 //public static const int ADVFCACHE_ONSAVE = 32; | |
186 public static const int CF_TEXT = 1; | |
187 public static const int CF_BITMAP = 2; | |
188 public static const int CF_METAFILEPICT = 3; | |
189 public static const int CF_SYLK = 4; | |
190 public static const int CF_DIF = 5; | |
191 public static const int CF_TIFF = 6; | |
192 public static const int CF_OEMTEXT = 7; | |
193 public static const int CF_DIB = 8; | |
194 public static const int CF_PALETTE = 9; | |
195 public static const int CF_PENDATA = 10; | |
196 public static const int CF_RIFF = 11; | |
197 public static const int CF_WAVE = 12; | |
198 public static const int CF_UNICODETEXT = 13; | |
199 public static const int CF_ENHMETAFILE = 14; | |
200 public static const int CF_HDROP = 15; | |
201 public static const int CF_LOCALE = 16; | |
202 public static const int CF_MAX = 17; | |
203 public static const int CLSCTX_INPROC_HANDLER = 2; | |
204 public static const int CLSCTX_INPROC_SERVER = 1; | |
205 public static const int CLSCTX_LOCAL_SERVER = 4; | |
206 public static const int CLSCTX_REMOTE_SERVER = 16; | |
207 public static const int CO_E_CLASSSTRING = -2147221005; | |
208 //public static const int COINIT_APARTMENTTHREADED = 2; | |
209 //public static const int COINIT_DISABLE_OLE1DDE = 4; | |
210 //public static const int COINIT_MULTITHREADED = 0; | |
211 //public static const int COINIT_SPEED_OVER_MEMORY = 8; | |
212 public static const int DATADIR_GET = 1; | |
213 public static const int DATADIR_SET = 2; | |
214 public static const int DISP_E_EXCEPTION = 0x80020009; | |
215 public static const int DISP_E_MEMBERNOTFOUND = -2147352573; | |
216 public static const int DISP_E_UNKNOWNINTERFACE = 0x80020001; | |
217 //public static const int DISPID_AMBIENT_APPEARANCE = -716; | |
218 //public static const int DISPID_AMBIENT_AUTOCLIP = -715; | |
219 public static const int DISPID_AMBIENT_BACKCOLOR = -701; | |
220 //public static const int DISPID_AMBIENT_CHARSET = -727; | |
221 //public static const int DISPID_AMBIENT_CODEPAGE = -725; | |
222 //public static const int DISPID_AMBIENT_DISPLAYASDEFAULT = -713; | |
223 //public static const int DISPID_AMBIENT_DISPLAYNAME = -702; | |
224 public static const int DISPID_AMBIENT_FONT = -703; | |
225 public static const int DISPID_AMBIENT_FORECOLOR = -704; | |
226 public static const int DISPID_AMBIENT_LOCALEID = -705; | |
227 public static const int DISPID_AMBIENT_MESSAGEREFLECT = -706; | |
228 public static const int DISPID_AMBIENT_OFFLINEIFNOTCONNECTED = -5501; | |
229 //public static const int DISPID_AMBIENT_PALETTE = -726; | |
230 //public static const int DISPID_AMBIENT_RIGHTTOLEFT = -732; | |
231 //public static const int DISPID_AMBIENT_SCALEUNITS = -707; | |
232 public static const int DISPID_AMBIENT_SHOWGRABHANDLES = -711; | |
233 public static const int DISPID_AMBIENT_SHOWHATCHING = -712; | |
234 public static const int DISPID_AMBIENT_SILENT = -5502; | |
235 public static const int DISPID_AMBIENT_SUPPORTSMNEMONICS = -714; | |
236 //public static const int DISPID_AMBIENT_TEXTALIGN = -708; | |
237 //public static const int DISPID_AMBIENT_TOPTOBOTTOM = -733; | |
238 //public static const int DISPID_AMBIENT_TRANSFERPRIORITY = -728; | |
239 public static const int DISPID_AMBIENT_UIDEAD = -710; | |
240 public static const int DISPID_AMBIENT_USERMODE = -709; | |
241 public static const int DISPID_BACKCOLOR = -501; | |
242 public static const int DISPID_FONT = -512; | |
243 public static const int DISPID_FONT_BOLD = 3; | |
244 public static const int DISPID_FONT_CHARSET = 8; | |
245 public static const int DISPID_FONT_ITALIC = 4; | |
246 public static const int DISPID_FONT_NAME = 0; | |
247 public static const int DISPID_FONT_SIZE = 2; | |
248 public static const int DISPID_FONT_STRIKE = 6; | |
249 public static const int DISPID_FONT_UNDER = 5; | |
250 public static const int DISPID_FONT_WEIGHT = 7; | |
251 public static const int DISPID_FORECOLOR = -513; | |
252 public static const int DISPID_HTMLDOCUMENTEVENTS_ONDBLCLICK = 0xFFFFFDA7; | |
253 public static const int DISPID_HTMLDOCUMENTEVENTS_ONDRAGSTART = 0x8001000B; | |
254 public static const int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEOUT = 0x80010009; | |
255 public static const int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEOVER = 0x80010008; | |
256 public static const int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEMOVE = 0xFFFFFDA2; | |
257 public static const int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEDOWN = 0xFFFFFDA3; | |
258 public static const int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEUP = 0xFFFFFDA1; | |
259 public static const int DISPID_HTMLDOCUMENTEVENTS_ONSTOP = 0x00000402; | |
260 | |
261 //public static const int DISPID_READYSTATE = -525; | |
262 //public static const int DISPID_READYSTATECHANGE = -609; | |
263 public static const int DRAGDROP_S_DROP = 0x00040100; | |
264 public static const int DRAGDROP_S_CANCEL = 0x00040101; | |
265 public static const int DRAGDROP_S_USEDEFAULTCURSORS = 0x00040102; | |
266 public static const int DROPEFFECT_NONE = 0; | |
267 public static const int DROPEFFECT_COPY = 1; | |
268 public static const int DROPEFFECT_MOVE = 2; | |
269 public static const int DROPEFFECT_LINK = 4; | |
270 public static const int DROPEFFECT_SCROLL = 0x80000000; | |
271 public static const int DV_E_FORMATETC = -2147221404; | |
272 public static const int DV_E_STGMEDIUM = -2147221402; | |
273 public static const int DV_E_TYMED = -2147221399; | |
274 public static const int DVASPECT_CONTENT = 1; | |
275 //public static const int DVASPECT_DOCPRINT = 8; | |
276 //public static const int DVASPECT_ICON = 4; | |
277 //public static const int DVASPECT_THUMBNAIL = 2; | |
278 public static const int E_FAIL = -2147467259; | |
279 public static const int E_INVALIDARG = -2147024809; | |
280 public static const int E_NOINTERFACE = -2147467262; | |
281 public static const int E_NOTIMPL = -2147467263; | |
282 public static const int E_NOTSUPPORTED = 0x80040100; | |
283 //public static const int E_NOTLICENSED = -2147221230; | |
284 public static const int E_OUTOFMEMORY = -2147024882; | |
285 //public static const int E_POINTER = -2147467261; | |
286 public static const int GMEM_FIXED = 0; | |
287 //public static const int GMEM_MOVABLE = 2; | |
288 //public static const int GMEM_NODISCARD = 32; | |
289 public static const int GMEM_ZEROINIT = 64; | |
290 public static const int GUIDKIND_DEFAULT_SOURCE_DISP_IID = 1; | |
291 public static const int IMPLTYPEFLAG_FDEFAULT = 1; | |
292 //public static const int IMPLTYPEFLAG_FDEFAULTVTABLE = 2048; | |
293 public static const int IMPLTYPEFLAG_FRESTRICTED = 4; | |
294 public static const int IMPLTYPEFLAG_FSOURCE = 2; | |
295 public static const int LOCALE_SYSTEM_DEFAULT = 1024; | |
296 public static const int LOCALE_USER_DEFAULT = 2048; | |
297 //public static const int MEMCTX_TASK = 1; | |
298 //public static const int OLEACTIVATEAUTO = 3; | |
299 //public static const int OLEACTIVATEDOUBLECLICK = 2; | |
300 //public static const int OLEACTIVATEGETFOCUS = 1; | |
301 //public static const int OLEACTIVATEMANUAL = 0; | |
302 //public static const int OLEAUTOMATIC = 0; | |
303 //public static const int OLECHANGED = 0; | |
304 public static const int OLECLOSE_NOSAVE = 1; | |
305 //public static const int OLECLOSE_PROMPTSAVE = 2; | |
306 public static const int OLECLOSE_SAVEIFDIRTY = 0; | |
307 //public static const int OLECLOSED = 2; | |
308 //public static const int OLECONTF_EMBEDDINGS = 1; | |
309 //public static const int OLECONTF_LINKS = 2; | |
310 //public static const int OLECONTF_ONLYIFRUNNING = 16; | |
311 //public static const int OLECONTF_ONLYUSER = 8; | |
312 //public static const int OLECONTF_OTHERS = 4; | |
313 //public static const int OLEDEACTIVATEMANUAL = 1; | |
314 //public static const int OLEDEACTIVATEONLOSEFOCUS = 0; | |
315 //public static const int OLEDECBORDER = 1; | |
316 //public static const int OLEDECBORDERANDNIBS = 3; | |
317 //public static const int OLEDECNIBS = 2; | |
318 //public static const int OLEDECNONE = 0; | |
319 //public static const int OLEDISPLAYCONTENT = 0; | |
320 //public static const int OLEDISPLAYICON = 1; | |
321 //public static const int OLEEITHER = 2; | |
322 public static const int OLEEMBEDDED = 1; | |
323 //public static const int OLEFROZEN = 1; | |
324 public static const int OLEIVERB_DISCARDUNDOSTATE = -6; | |
325 //public static const int OLEIVERB_HIDE = -3; | |
326 public static const int OLEIVERB_INPLACEACTIVATE = -5; | |
327 //public static const int OLEIVERB_OPEN = -2; | |
328 public static const int OLEIVERB_PRIMARY = 0; | |
329 //public static const int OLEIVERB_PROPERTIES = -7; | |
330 //public static const int OLEIVERB_SHOW = -1; | |
331 //public static const int OLEIVERB_UIACTIVATE = -4; | |
332 public static const int OLELINKED = 0; | |
333 //public static const int OLEMANUAL = 2; | |
334 //public static const int OLEMISC_ACTIVATEWHENVISIBLE = 256; | |
335 //public static const int OLEMISC_ACTSLIKEBUTTON = 4096; | |
336 //public static const int OLEMISC_ACTSLIKELABEL = 8192; | |
337 //public static const int OLEMISC_ALIGNABLE = 32768; | |
338 //public static const int OLEMISC_ALWAYSRUN = 2048; | |
339 //public static const int OLEMISC_CANLINKBYOLE1 = 32; | |
340 //public static const int OLEMISC_CANTLINKINSIDE = 16; | |
341 //public static const int OLEMISC_IGNOREACTIVATEWHENVISIBLE = 524288; | |
342 //public static const int OLEMISC_IMEMODE = 262144; | |
343 //public static const int OLEMISC_INSERTNOTREPLACE = 4; | |
344 //public static const int OLEMISC_INSIDEOUT = 128; | |
345 //public static const int OLEMISC_INVISIBLEATRUNTIME = 1024; | |
346 //public static const int OLEMISC_ISLINKOBJECT = 64; | |
347 //public static const int OLEMISC_NOUIACTIVATE = 16384; | |
348 //public static const int OLEMISC_ONLYICONIC = 2; | |
349 //public static const int OLEMISC_RECOMPOSEONRESIZE = 1; | |
350 //public static const int OLEMISC_RENDERINGISDEVICEINDEPENDENT = 512; | |
351 //public static const int OLEMISC_SETCLIENTSITEFIRST = 131072; | |
352 //public static const int OLEMISC_SIMPLEFRAME = 65536; | |
353 //public static const int OLEMISC_STATIC = 8; | |
354 //public static const int OLEMISC_SUPPORTSMULTILEVELUNDO = 2097152; | |
355 //public static const int OLEMISC_WANTSTOMENUMERGE = 1048576; | |
356 //public static const int OLENONE = 3; | |
357 //public static const int OLERENAMED = 3; | |
358 //public static const int OLERENDER_ASIS = 3; | |
359 public static const int OLERENDER_DRAW = 1; | |
360 //public static const int OLERENDER_FORMAT = 2; | |
361 //public static const int OLERENDER_NONE = 0; | |
362 //public static const int OLESAVED = 1; | |
363 //public static const int OLESIZEAUTOSIZE = 2; | |
364 //public static const int OLESIZECLIP = 0; | |
365 //public static const int OLESIZESTRETCH = 1; | |
366 //public static const int OLESIZEZOOM = 3; | |
367 //public static const int OLEWHICHMK_CONTAINER = 1; | |
368 //public static const int OLEWHICHMK_OBJFULL = 3; | |
369 //public static const int OLEWHICHMK_OBJREL = 2; | |
370 public static const int S_FALSE = 1; | |
371 public static const int S_OK = 0; | |
372 public static const int STG_E_FILENOTFOUND = 0x80030002; | |
373 public static const int STG_S_CONVERTED = 0x00030200; | |
374 //public static const int STGC_CONSOLIDATE = 8; | |
375 //public static const int STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4; | |
376 public static const int STGC_DEFAULT = 0; | |
377 //public static const int STGC_ONLYIFCURRENT = 2; | |
378 //public static const int STGC_OVERWRITE = 1; | |
379 public static const int STGM_CONVERT = 0x00020000; | |
380 public static const int STGM_CREATE = 0x00001000; | |
381 public static const int STGM_DELETEONRELEASE = 0x04000000; | |
382 public static const int STGM_DIRECT = 0x00000000; | |
383 public static const int STGM_DIRECT_SWMR = 0x00400000; | |
384 public static const int STGM_FAILIFTHERE = 0x00000000; | |
385 public static const int STGM_NOSCRATCH = 0x00100000; | |
386 public static const int STGM_NOSNAPSHOT = 0x00200000; | |
387 public static const int STGM_PRIORITY = 0x00040000; | |
388 public static const int STGM_READ = 0x00000000; | |
389 public static const int STGM_READWRITE = 0x00000002; | |
390 public static const int STGM_SHARE_DENY_NONE = 0x00000040; | |
391 public static const int STGM_SHARE_DENY_READ = 0x00000030; | |
392 public static const int STGM_SHARE_DENY_WRITE = 0x00000020; | |
393 public static const int STGM_SHARE_EXCLUSIVE = 0x00000010; | |
394 public static const int STGM_SIMPLE = 0x08000000; | |
395 public static const int STGM_TRANSACTED = 0x00010000; | |
396 public static const int STGM_WRITE = 0x00000001; | |
397 public static const int STGTY_STORAGE = 1; | |
398 public static const int STGTY_STREAM = 2; | |
399 public static const int STGTY_LOCKBYTES = 3; | |
400 public static const int STGTY_PROPERTY = 4; | |
401 //public static const int TYMED_ENHMF = 64; | |
402 //public static const int TYMED_FILE = 2; | |
403 //public static const int TYMED_GDI = 16; | |
404 public static const int TYMED_HGLOBAL = 1; | |
405 //public static const int TYMED_ISTORAGE = 8; | |
406 //public static const int TYMED_ISTREAM = 4; | |
407 //public static const int TYMED_MFPICT = 32; | |
408 //public static const int TYMED_NULL = 0; | |
409 public static const short DISPATCH_METHOD = 0x1; | |
410 public static const short DISPATCH_PROPERTYGET = 0x2; | |
411 public static const short DISPATCH_PROPERTYPUT = 0x4; | |
412 public static const short DISPATCH_PROPERTYPUTREF = 0x8; | |
413 //public static const short DISPID_CONSTRUCTOR = -6; | |
414 //public static const short DISPID_DESTRUCTOR = -7; | |
415 //public static const short DISPID_EVALUATE = -5; | |
416 //public static const short DISPID_NEWENUM = -4; | |
417 public static const short DISPID_PROPERTYPUT = -3; | |
418 //public static const short DISPID_UNKNOWN = -1; | |
419 //public static const short DISPID_VALUE = 0; | |
420 public static const short VT_BOOL = 11; | |
421 public static const short VT_BSTR = 8; | |
422 public static const short VT_BYREF = 16384; | |
423 public static const short VT_CY = 6; | |
424 public static const short VT_DATE = 7; | |
425 public static const short VT_DISPATCH = 9; | |
426 public static const short VT_EMPTY = 0; | |
427 public static const short VT_ERROR = 10; | |
428 public static const short VT_I1 = 16; | |
429 public static const short VT_I2 = 2; | |
430 public static const short VT_I4 = 3; | |
431 public static const short VT_I8 = 20; | |
432 public static const short VT_NULL = 1; | |
433 public static const short VT_R4 = 4; | |
434 public static const short VT_R8 = 5; | |
435 public static const short VT_UI1 = 17; | |
436 public static const short VT_UI2 = 18; | |
437 public static const short VT_UI4 = 19; | |
438 public static const short VT_UNKNOWN = 13; | |
439 public static const short VT_VARIANT = 12; | |
440 public static const short VARIANT_TRUE = -1; | |
441 public static const short VARIANT_FALSE = 0; | |
442 | |
443 | |
444 // alias dwt.internal.ole.win32.comapi. | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
134
diff
changeset
|
445 // public static GUID* IIDFromString(String lpsz) { |
97 | 446 // GUID* lpiid = new GUID(); |
447 // if (COM.IIDFromString(Converter.StrToWCHARz(lpsz), lpiid) == COM.S_OK) | |
448 // return lpiid; | |
449 // return null; | |
450 // } | |
451 | |
452 alias COMAPI.CLSIDFromProgID CLSIDFromProgID; | |
453 alias COMAPI.CLSIDFromString CLSIDFromString; | |
454 alias COMAPI.CoCreateInstance CoCreateInstance; | |
455 alias COMAPI.CoFreeUnusedLibraries CoFreeUnusedLibraries; | |
456 alias COMAPI.CoGetClassObject CoGetClassObject; | |
457 alias COMAPI.CoLockObjectExternal CoLockObjectExternal; | |
458 alias COMAPI.CoTaskMemAlloc CoTaskMemAlloc; | |
459 alias COMAPI.CoTaskMemFree CoTaskMemFree; | |
460 alias COMAPI.CreateStdAccessibleObject CreateStdAccessibleObject; | |
461 alias COMAPI.CreateStreamOnHGlobal CreateStreamOnHGlobal; | |
462 alias COMAPI.DoDragDrop DoDragDrop; | |
463 alias COMAPI.GetClassFile GetClassFile; | |
464 alias COMAPI.IIDFromString IIDFromString; | |
465 alias COMAPI.IsEqualGUID IsEqualGUID; | |
466 alias COMAPI.LresultFromObject LresultFromObject; | |
467 alias COMAPI.OleCreate OleCreate; | |
468 alias COMAPI.OleCreateFromFile OleCreateFromFile; | |
469 alias COMAPI.OleCreatePropertyFrame OleCreatePropertyFrame; | |
470 alias COMAPI.OleDraw OleDraw; | |
471 alias COMAPI.OleFlushClipboard OleFlushClipboard; | |
472 alias COMAPI.OleGetClipboard OleGetClipboard; | |
473 alias COMAPI.OleIsCurrentClipboard OleIsCurrentClipboard; | |
474 alias COMAPI.OleIsRunning OleIsRunning; | |
475 alias COMAPI.OleLoad OleLoad; | |
476 alias COMAPI.OleRun OleRun; | |
477 alias COMAPI.OleSave OleSave; | |
478 alias COMAPI.OleSetClipboard OleSetClipboard; | |
479 alias COMAPI.OleSetContainedObject OleSetContainedObject; | |
480 alias COMAPI.OleSetMenuDescriptor OleSetMenuDescriptor; | |
481 alias COMAPI.OleTranslateColor OleTranslateColor; | |
482 alias COMAPI.ProgIDFromCLSID ProgIDFromCLSID; | |
483 alias COMAPI.RegisterDragDrop RegisterDragDrop; | |
484 alias COMAPI.ReleaseStgMedium ReleaseStgMedium; | |
485 alias COMAPI.RevokeDragDrop RevokeDragDrop; | |
486 alias COMAPI.StgCreateDocfile StgCreateDocfile; | |
487 alias COMAPI.StgIsStorageFile StgIsStorageFile; | |
488 alias COMAPI.StgOpenStorage StgOpenStorage; | |
489 alias COMAPI.StringFromCLSID StringFromCLSID; | |
490 alias COMAPI.SysAllocString SysAllocString; | |
491 alias COMAPI.SysFreeString SysFreeString; | |
492 alias COMAPI.SysStringByteLen SysStringByteLen; | |
493 alias COMAPI.VariantChangeType VariantChangeType; | |
494 alias COMAPI.VariantClear VariantClear; | |
495 alias COMAPI.VariantCopy VariantCopy; | |
496 alias COMAPI.VariantInit VariantInit; | |
497 alias COMAPI.WriteClassStg WriteClassStg; | |
498 | |
499 /** | |
500 * <Shawn Liu> | |
501 * VtbCall partially kept, use VtbCall instead of automation can promote performace | |
502 * and VtbCall doesn't need prototype of interface declaration | |
503 */ | |
504 | |
505 public static int VtblCall(int fnNumber, void* ppVtbl) { | |
506 Function1 fn = cast(Function1)(*cast(int **)ppVtbl)[fnNumber]; | |
507 return fn(ppVtbl); | |
508 } | |
509 | |
510 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0){ | |
511 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber]; | |
512 return fn(ppVtbl, arg0); | |
513 } | |
514 | |
515 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1){ | |
516 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber]; | |
517 return fn(ppVtbl, arg0, arg1); | |
518 } | |
519 | |
520 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2){ | |
521 Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber]; | |
522 return fn(ppVtbl, arg0, arg1, arg2); | |
523 } | |
524 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3){ | |
525 Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber]; | |
526 return fn(ppVtbl, arg0, arg1, arg2, arg3); | |
527 } | |
528 | |
529 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4){ | |
530 Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber]; | |
531 return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4); | |
532 } | |
533 | |
534 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5){ | |
535 Function7 fn = cast(Function7)(*cast(int **)ppVtbl)[fnNumber]; | |
536 return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5); | |
537 } | |
538 | |
539 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6){ | |
540 Function8 fn = cast(Function8)(*cast(int **)ppVtbl)[fnNumber]; | |
541 return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6); | |
542 } | |
543 | |
544 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7){ | |
545 Function9 fn = cast(Function9)(*cast(int **)ppVtbl)[fnNumber]; | |
546 return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); | |
547 } | |
548 | |
549 /* | |
550 public static int VtblCall(int fnNumber, void* ppVtbl) { | |
551 Function1 fn = cast(Function1)(*cast(int **)ppVtbl)[fnNumber]; | |
552 return fn(ppVtbl); | |
553 } | |
554 | |
555 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0){ | |
556 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber]; | |
557 return fn(ppVtbl, arg0); | |
558 } | |
559 | |
560 public static int VtblCall(int fnNumber, void* ppVtbl, void* arg0){ | |
561 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber]; | |
562 return fn(ppVtbl, cast(int)arg0); | |
563 } | |
564 | |
565 public static int VtblCall(int fnNumber, void* ppVtbl, wchar* arg0) { | |
566 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber]; | |
567 return fn(ppVtbl, cast(int)arg0); | |
568 } | |
569 public static int VtblCall(int fnNumber, void* ppVtbl, wchar* arg0, wchar* arg1){ | |
570 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber]; | |
571 return fn(ppVtbl, cast(int)arg0, cast(int)arg1); | |
572 } | |
573 public static int VtblCall(int fnNumber, void* ppVtbl, wchar* arg0, int arg1) { | |
574 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber]; | |
575 return fn(ppVtbl, cast(int)arg0, arg1); | |
576 } | |
577 public static int VtblCall(int fnNumber, void* ppVtbl, wchar* arg0, int arg1, int arg2, int arg3, int[] arg4) { | |
578 Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber]; | |
579 return fn(ppVtbl, cast(int)arg0, arg1, arg2, arg3, cast(int)cast(int*)arg4); | |
580 } | |
581 public static int VtblCall(int fnNumber, void* ppVtbl, wchar* arg0, int arg1, int arg2, int arg3, int arg4, int[] arg5) { | |
582 Function7 fn = cast(Function7)(*cast(int **)ppVtbl)[fnNumber]; | |
583 return fn(ppVtbl, cast(int)arg0, arg1, arg2, arg3, arg4, cast(int)cast(int*)arg5); | |
584 } | |
585 public static int VtblCall(int fnNumber, void* ppVtbl, int[] arg0) { | |
586 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber]; | |
587 return fn(ppVtbl, cast(int)cast(int*)arg0); | |
588 } | |
589 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int[] arg1) { | |
590 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber]; | |
591 return fn(ppVtbl, arg0, cast(int)cast(int*)arg1); | |
592 } | |
593 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1) { | |
594 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber]; | |
595 return fn(ppVtbl, arg0, arg1); | |
596 } | |
597 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int[] arg2) { | |
598 Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber]; | |
599 return fn(ppVtbl, arg0, arg1, cast(int)cast(int*)arg2); | |
600 } | |
601 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2) { | |
602 Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber]; | |
603 return fn(ppVtbl, arg0, arg1, arg2); | |
604 } | |
605 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int[] arg3) { | |
606 Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber]; | |
607 return fn(ppVtbl, arg0, arg1, arg2, cast(int)cast(int*)arg3); | |
608 } | |
609 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, DVTARGETDEVICE* arg2, SIZE* arg3) { | |
610 Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber]; | |
611 return fn(ppVtbl, arg0, arg1, cast(int)(arg2), cast(int)(arg3)); | |
612 } | |
613 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, GUID* arg2, int arg3, int[] arg4) { | |
614 Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber]; | |
615 return fn(ppVtbl, arg0, arg1, cast(int)(arg2), arg3, cast(int)cast(int*)arg4); | |
616 } | |
617 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, FORMATETC* arg1, int[] arg2) { | |
618 Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber]; | |
619 return fn(ppVtbl, arg0, cast(int)(arg1), cast(int)cast(int*)arg2); | |
620 } | |
621 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, GUID* arg1) { | |
622 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber]; | |
623 return fn(ppVtbl, arg0, cast(int)(arg1)); | |
624 } | |
625 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, GUID* arg1, int arg2, int arg3) { | |
626 Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber]; | |
627 return fn(ppVtbl, arg0, cast(int)(arg1), arg2, arg3); | |
628 } | |
629 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, GUID* arg1, int arg2, int arg3, DISPPARAMS* arg4, int arg5, EXCEPINFO* arg6, int[] arg7) { | |
630 Function9 fn = cast(Function9)(*cast(int **)ppVtbl)[fnNumber]; | |
631 return fn(ppVtbl, arg0, cast(int)(arg1), arg2, arg3, cast(int)(arg4), arg5, cast(int)(arg6), cast(int)cast(int*)arg7); | |
632 } | |
633 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, STATSTG* arg1, int[] arg2) { | |
634 Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber]; | |
635 return fn(ppVtbl, arg0, cast(int)(arg1), cast(int)cast(int*)arg2); | |
636 } | |
637 public static int VtblCall(int fnNumber, void* ppVtbl, MSG* arg0) { | |
638 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber]; | |
639 return fn(ppVtbl, cast(int)(arg0)); | |
640 } | |
641 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, MSG* arg1, int arg2, int arg3, int arg4, RECT* arg5) { | |
642 Function7 fn = cast(Function7)(*cast(int **)ppVtbl)[fnNumber]; | |
643 return fn(ppVtbl, arg0, cast(int)(arg1), arg2, arg3, arg4, cast(int)(arg5)); | |
644 } | |
645 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, SIZE* arg1) { | |
646 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber]; | |
647 return fn(ppVtbl, arg0, cast(int)(arg1)); | |
648 } | |
649 | |
650 // TODO: the type of BOOL ??? | |
651 // conflict with VtblCall(int, int, int, int); | |
652 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, bool arg1) { | |
653 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber]; | |
654 return fn(ppVtbl, arg0, cast(int)arg1); | |
655 } | |
656 public static int VtblCall(int fnNumber, void* ppVtbl, CAUUID* arg0) { | |
657 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber]; | |
658 return fn(ppVtbl, cast(int)(arg0)); | |
659 } | |
660 public static int VtblCall(int fnNumber, void* ppVtbl, CONTROLINFO* arg0) { | |
661 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber]; | |
662 return fn(ppVtbl, cast(int)(arg0)); | |
663 } | |
664 public static int VtblCall(int fnNumber, void* ppVtbl, FORMATETC* arg0) { | |
665 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber]; | |
666 return fn(ppVtbl, cast(int)(arg0)); | |
667 } | |
668 public static int VtblCall(int fnNumber, void* ppVtbl, FORMATETC* arg0, STGMEDIUM* arg1) { | |
669 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber]; | |
670 return fn(ppVtbl, cast(int)(arg0), cast(int)(arg1)); | |
671 } | |
672 // TODO: BOOL type ??? | |
673 public static int VtblCall(int fnNumber, void* ppVtbl, FORMATETC* arg0, STGMEDIUM* arg1, int arg2) { | |
674 Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber]; | |
675 return fn(ppVtbl, cast(int)(arg0), cast(int)(arg1), arg2); | |
676 } | |
677 public static int VtblCall(int fnNumber, void* ppVtbl, GUID* arg0) { | |
678 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber]; | |
679 return fn(ppVtbl, cast(int)(arg0)); | |
680 } | |
681 | |
682 public static int VtblCall(int fnNumber, void* ppVtbl, GUID* arg0, int[] arg1) { | |
683 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber]; | |
684 return fn(ppVtbl, cast(int)(arg0), cast(int)cast(int*)arg1); | |
685 } | |
686 | |
687 public static int VtblCall(int fnNumber, void* ppVtbl, GUID* arg0, int arg1, int arg2, int arg3, int[] arg4) { | |
688 Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber]; | |
689 return fn(ppVtbl, cast(int)(arg0), arg1, arg2, arg3, cast(int)cast(int*)arg4); | |
690 } | |
691 public static int VtblCall(int fnNumber, void* ppVtbl, GUID* arg0, int arg1, int arg2, int arg3, int arg4) { | |
692 Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber]; | |
693 return fn(ppVtbl, cast(int)(arg0), arg1, arg2, arg3, arg4); | |
694 } | |
695 public static int VtblCall(int fnNumber, void* ppVtbl, GUID* arg0, int arg1, OLECMD* arg2, OLECMDTEXT* arg3) { | |
696 Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber]; | |
697 return fn(ppVtbl, cast(int)(arg0), arg1, cast(int)(arg2), cast(int)(arg3)); | |
698 } | |
699 public static int VtblCall(int fnNumber, void* ppVtbl, LICINFO* arg0) { | |
700 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber]; | |
701 return fn(ppVtbl, cast(int)(arg0)); | |
702 } | |
703 public static int VtblCall(int fnNumber, void* ppVtbl, RECT* arg0, int arg1, int arg2) { | |
704 Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber]; | |
705 return fn(ppVtbl, cast(int)(arg0), arg1, arg2); | |
706 } | |
707 public static int VtblCall(int fnNumber, void* ppVtbl, RECT* arg0, RECT* arg1) { | |
708 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber]; | |
709 return fn(ppVtbl, cast(int)(arg0), cast(int)(arg1)); | |
710 } | |
711 public static int VtblCall(int fnNumber, void* ppVtbl, RECT* arg0) { | |
712 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber]; | |
713 return fn(ppVtbl, cast(int)(arg0)); | |
714 } | |
715 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int[] arg1, int[] arg2, int[] arg3, int[] arg4) { | |
716 Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber]; | |
717 return fn(ppVtbl, arg0, cast(int)cast(int*)arg1, cast(int)cast(int*)arg2, cast(int)cast(int*)arg3, cast(int)cast(int*)arg4); | |
718 } | |
719 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int[] arg1, int arg2, int[] arg3) { | |
720 Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber]; | |
721 return fn(ppVtbl, arg0, cast(int)cast(int*)arg1, arg2, cast(int)cast(int*)arg3); | |
722 } | |
723 | |
724 | |
725 // Start ACCESSIBILITY | |
726 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3) { | |
727 Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber]; | |
728 return fn(ppVtbl, arg0, arg1, arg2, arg3); | |
729 } | |
730 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4) { | |
731 Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber]; | |
732 return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4); | |
733 } | |
734 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5) { | |
735 Function7 fn = cast(Function7)(*cast(int **)ppVtbl)[fnNumber]; | |
736 return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5); | |
737 } | |
738 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7) { | |
739 Function9 fn = cast(Function9)(*cast(int **)ppVtbl)[fnNumber]; | |
740 return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); | |
741 } | |
742 | |
743 */ | |
744 | |
98 | 745 |
746 public static const int CHILDID_SELF = 0; | |
97 | 747 public static const int CO_E_OBJNOTCONNECTED = 0x800401FD; |
748 | |
749 //public static const int ROLE_SYSTEM_TITLEBAR = 0x1; | |
750 public static const int ROLE_SYSTEM_MENUBAR = 0x2; | |
751 public static const int ROLE_SYSTEM_SCROLLBAR = 0x3; | |
752 //public static const int ROLE_SYSTEM_GRIP = 0x4; | |
753 //public static const int ROLE_SYSTEM_SOUND = 0x5; | |
754 //public static const int ROLE_SYSTEM_CURSOR = 0x6; | |
755 //public static const int ROLE_SYSTEM_CARET = 0x7; | |
756 //public static const int ROLE_SYSTEM_ALERT = 0x8; | |
757 public static const int ROLE_SYSTEM_WINDOW = 0x9; | |
758 public static const int ROLE_SYSTEM_CLIENT = 0xa; | |
759 public static const int ROLE_SYSTEM_MENUPOPUP = 0xb; | |
760 public static const int ROLE_SYSTEM_MENUITEM = 0xc; | |
761 public static const int ROLE_SYSTEM_TOOLTIP = 0xd; | |
762 //public static const int ROLE_SYSTEM_APPLICATION = 0xe; | |
763 //public static const int ROLE_SYSTEM_DOCUMENT = 0xf; | |
764 //public static const int ROLE_SYSTEM_PANE = 0x10; | |
765 //public static const int ROLE_SYSTEM_CHART = 0x11; | |
766 public static const int ROLE_SYSTEM_DIALOG = 0x12; | |
767 //public static const int ROLE_SYSTEM_BORDER = 0x13; | |
768 //public static const int ROLE_SYSTEM_GROUPING = 0x14; | |
769 public static const int ROLE_SYSTEM_SEPARATOR = 0x15; | |
770 public static const int ROLE_SYSTEM_TOOLBAR = 0x16; | |
771 //public static const int ROLE_SYSTEM_STATUSBAR = 0x17; | |
772 public static const int ROLE_SYSTEM_TABLE = 0x18; | |
773 public static const int ROLE_SYSTEM_COLUMNHEADER = 0x19; | |
774 public static const int ROLE_SYSTEM_ROWHEADER = 0x1a; | |
775 //public static const int ROLE_SYSTEM_COLUMN = 0x1b; | |
776 //public static const int ROLE_SYSTEM_ROW = 0x1c; | |
777 public static const int ROLE_SYSTEM_CELL = 0x1d; | |
778 public static const int ROLE_SYSTEM_LINK = 0x1e; | |
779 //public static const int ROLE_SYSTEM_HELPBALLOON = 0x1f; | |
780 //public static const int ROLE_SYSTEM_CHARACTER = 0x20; | |
781 public static const int ROLE_SYSTEM_LIST = 0x21; | |
782 public static const int ROLE_SYSTEM_LISTITEM = 0x22; | |
783 public static const int ROLE_SYSTEM_OUTLINE = 0x23; | |
784 public static const int ROLE_SYSTEM_OUTLINEITEM = 0x24; | |
785 public static const int ROLE_SYSTEM_PAGETAB = 0x25; | |
786 //public static const int ROLE_SYSTEM_PROPERTYPAGE = 0x26; | |
787 //public static const int ROLE_SYSTEM_INDICATOR = 0x27; | |
788 //public static const int ROLE_SYSTEM_GRAPHIC = 0x28; | |
789 public static const int ROLE_SYSTEM_STATICTEXT = 0x29; | |
790 public static const int ROLE_SYSTEM_TEXT = 0x2a; | |
791 public static const int ROLE_SYSTEM_PUSHBUTTON = 0x2b; | |
792 public static const int ROLE_SYSTEM_CHECKBUTTON = 0x2c; | |
793 public static const int ROLE_SYSTEM_RADIOBUTTON = 0x2d; | |
794 public static const int ROLE_SYSTEM_COMBOBOX = 0x2e; | |
795 //public static const int ROLE_SYSTEM_DROPLIST = 0x2f; | |
796 public static const int ROLE_SYSTEM_PROGRESSBAR = 0x30; | |
797 //public static const int ROLE_SYSTEM_DIAL = 0x31; | |
798 //public static const int ROLE_SYSTEM_HOTKEYFIELD = 0x32; | |
799 public static const int ROLE_SYSTEM_SLIDER = 0x33; | |
800 //public static const int ROLE_SYSTEM_SPINBUTTON = 0x34; | |
801 //public static const int ROLE_SYSTEM_DIAGRAM = 0x35; | |
802 //public static const int ROLE_SYSTEM_ANIMATION = 0x36; | |
803 //public static const int ROLE_SYSTEM_EQUATION = 0x37; | |
804 //public static const int ROLE_SYSTEM_BUTTONDROPDOWN = 0x38; | |
805 //public static const int ROLE_SYSTEM_BUTTONMENU = 0x39; | |
806 //public static const int ROLE_SYSTEM_BUTTONDROPDOWNGRID = 0x3a; | |
807 //public static const int ROLE_SYSTEM_WHITESPACE = 0x3b; | |
808 public static const int ROLE_SYSTEM_PAGETABLIST = 0x3c; | |
809 //public static const int ROLE_SYSTEM_CLOCK = 0x3d; | |
810 | |
98 | 811 public static const int STATE_SYSTEM_NORMAL = 0; |
812 //public static const int STATE_SYSTEM_UNAVAILABLE = 0x1; | |
813 public static const int STATE_SYSTEM_SELECTED = 0x2; | |
814 public static const int STATE_SYSTEM_FOCUSED = 0x4; | |
815 public static const int STATE_SYSTEM_PRESSED = 0x8; | |
816 public static const int STATE_SYSTEM_CHECKED = 0x10; | |
817 //public static const int STATE_SYSTEM_MIXED = 0x20; | |
818 //public static const int STATE_SYSTEM_INDETERMINATE = STATE_SYSTEM_MIXED; | |
819 public static const int STATE_SYSTEM_READONLY = 0x40; | |
820 public static const int STATE_SYSTEM_HOTTRACKED = 0x80; | |
821 //public static const int STATE_SYSTEM_DEFAULT = 0x100; | |
822 public static const int STATE_SYSTEM_EXPANDED = 0x200; | |
823 public static const int STATE_SYSTEM_COLLAPSED = 0x400; | |
824 public static const int STATE_SYSTEM_BUSY = 0x800; | |
825 //public static const int STATE_SYSTEM_FLOATING = 0x1000; | |
826 //public static const int STATE_SYSTEM_MARQUEED = 0x2000; | |
827 //public static const int STATE_SYSTEM_ANIMATED = 0x4000; | |
828 public static const int STATE_SYSTEM_INVISIBLE = 0x8000; | |
829 public static const int STATE_SYSTEM_OFFSCREEN = 0x10000; | |
830 public static const int STATE_SYSTEM_SIZEABLE = 0x20000; | |
831 //public static const int STATE_SYSTEM_MOVEABLE = 0x40000; | |
832 //public static const int STATE_SYSTEM_SELFVOICING = 0x80000; | |
833 public static const int STATE_SYSTEM_FOCUSABLE = 0x100000; | |
834 public static const int STATE_SYSTEM_SELECTABLE = 0x200000; | |
835 public static const int STATE_SYSTEM_LINKED = 0x400000; | |
836 //public static const int STATE_SYSTEM_TRAVERSED = 0x800000; | |
837 public static const int STATE_SYSTEM_MULTISELECTABLE = 0x1000000; | |
838 //public static const int STATE_SYSTEM_EXTSELECTABLE = 0x2000000; | |
839 //public static const int STATE_SYSTEM_ALERT_LOW = 0x4000000; | |
840 //public static const int STATE_SYSTEM_ALERT_MEDIUM = 0x8000000; | |
841 //public static const int STATE_SYSTEM_ALERT_HIGH = 0x10000000; | |
842 //public static const int STATE_SYSTEM_PROTECTED = 0x20000000; | |
843 //public static const int STATE_SYSTEM_VALID = 0x3fffffff; | |
97 | 844 |
845 /* End ACCESSIBILITY */ | |
846 | |
847 } | |
134 | 848 |
849 /** | |
850 * <Shawn> difference between WCHARzToStr(pwstr, -1) : | |
851 * BSTRToStr() internally call WCHARzToStr(pwstr, length) with length set, | |
852 * instead to determine the null ended, this mean BSTRToStr() can get string | |
853 * which has embedded null characters. | |
854 */ | |
855 // BSTR is aliased to wchar* | |
856 // Note : Free the "bstr" memory if freeTheString is true, default false | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
134
diff
changeset
|
857 String BSTRToStr( /*BSTR*/ inout wchar* bstr, bool freeTheString = false){ |
134 | 858 if(bstr is null) return null; |
859 int size = (SysStringByteLen(bstr) + 1)/wchar.sizeof; | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
134
diff
changeset
|
860 String result = WCHARzToStr(bstr, size); |
134 | 861 if(freeTheString) { |
862 // free the string and set ptr to null | |
863 SysFreeString(bstr); | |
864 bstr = null; | |
865 } | |
866 return result; | |
867 } | |
868 | |
869 | |
870 | |
871 | |
872 |