comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/ole/win32/COM.d @ 0:6dd524f61e62

add dwt win and basic java stuff
author Frank Benoit <benoit@tionex.de>
date Mon, 02 Mar 2009 14:44:16 +0100
parents
children d46287db17ed
comparison
equal deleted inserted replaced
-1:000000000000 0:6dd524f61e62
1 /*******************************************************************************
2 * Copyright (c) 2000, 2008 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
7 *
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 *******************************************************************************/
14 module org.eclipse.swt.internal.ole.win32.COM;
15
16
17 public import org.eclipse.swt.internal.ole.win32.COMTYPES;
18 private import org.eclipse.swt.internal.ole.win32.OAIDL;
19 private import org.eclipse.swt.internal.ole.win32.OBJIDL;
20 private import org.eclipse.swt.internal.ole.win32.OLEIDL;
21 private import org.eclipse.swt.internal.ole.win32.DOCOBJ;
22 private import org.eclipse.swt.internal.ole.win32.EXDISP;
23 private import org.eclipse.swt.internal.ole.win32.MSHTMHST;
24 private import org.eclipse.swt.internal.ole.win32.extras;
25 private import org.eclipse.swt.internal.ole.win32.ifs;
26 private import org.eclipse.swt.internal.ole.win32.COMAPI;
27 import java.lang.all;
28
29 private alias org.eclipse.swt.internal.ole.win32.COMAPI COMAPI;
30
31
32 public import org.eclipse.swt.internal.win32.OS;
33
34 template IIDFromStringT(String g) {
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
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
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$
107 public static const /*GUID*/ String IIDIHTMLDocumentEvents2 = /*IIDFromStringT!(*/"{3050F613-98B5-11CF-BB82-00AA00BDCE0B}"/*)*/;
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
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_ONDRAGEND = 0x80010015;
254 public static const int DISPID_HTMLDOCUMENTEVENTS_ONDRAGSTART = 0x8001000B;
255 public static const int DISPID_HTMLDOCUMENTEVENTS_ONKEYDOWN = 0xFFFFFDA6;
256 public static const int DISPID_HTMLDOCUMENTEVENTS_ONKEYPRESS = 0xFFFFFDA5;
257 public static const int DISPID_HTMLDOCUMENTEVENTS_ONKEYUP = 0xFFFFFDA4;
258 public static const int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEOUT = 0x80010009;
259 public static const int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEOVER = 0x80010008;
260 public static const int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEMOVE = 0xFFFFFDA2;
261 public static const int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEDOWN = 0xFFFFFDA3;
262 public static const int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEUP = 0xFFFFFDA1;
263 public static const int DISPID_HTMLDOCUMENTEVENTS_ONSTOP = 0x00000402;
264 public static const int DISPID_HTMLDOCUMENTEVENTS_ONMOUSEWHEEL = 1033;
265
266 //public static const int DISPID_READYSTATE = -525;
267 //public static const int DISPID_READYSTATECHANGE = -609;
268 public static const int DRAGDROP_S_DROP = 0x00040100;
269 public static const int DRAGDROP_S_CANCEL = 0x00040101;
270 public static const int DRAGDROP_S_USEDEFAULTCURSORS = 0x00040102;
271 public static const int DROPEFFECT_NONE = 0;
272 public static const int DROPEFFECT_COPY = 1;
273 public static const int DROPEFFECT_MOVE = 2;
274 public static const int DROPEFFECT_LINK = 4;
275 public static const int DROPEFFECT_SCROLL = 0x80000000;
276 public static final int DSH_ALLOWDROPDESCRIPTIONTEXT = 0x1;
277 public static const int DV_E_FORMATETC = -2147221404;
278 public static const int DV_E_STGMEDIUM = -2147221402;
279 public static const int DV_E_TYMED = -2147221399;
280 public static const int DVASPECT_CONTENT = 1;
281 //public static const int DVASPECT_DOCPRINT = 8;
282 //public static const int DVASPECT_ICON = 4;
283 //public static const int DVASPECT_THUMBNAIL = 2;
284 public static const int E_FAIL = -2147467259;
285 public static const int E_INVALIDARG = -2147024809;
286 public static const int E_NOINTERFACE = -2147467262;
287 public static const int E_NOTIMPL = -2147467263;
288 public static const int E_NOTSUPPORTED = 0x80040100;
289 //public static const int E_NOTLICENSED = -2147221230;
290 public static const int E_OUTOFMEMORY = -2147024882;
291 //public static const int E_POINTER = -2147467261;
292 public static const int GMEM_FIXED = 0;
293 //public static const int GMEM_MOVABLE = 2;
294 //public static const int GMEM_NODISCARD = 32;
295 public static const int GMEM_ZEROINIT = 64;
296 public static const int GUIDKIND_DEFAULT_SOURCE_DISP_IID = 1;
297 public static const int IMPLTYPEFLAG_FDEFAULT = 1;
298 //public static const int IMPLTYPEFLAG_FDEFAULTVTABLE = 2048;
299 public static const int IMPLTYPEFLAG_FRESTRICTED = 4;
300 public static const int IMPLTYPEFLAG_FSOURCE = 2;
301 public static const int LOCALE_SYSTEM_DEFAULT = 1024;
302 public static const int LOCALE_USER_DEFAULT = 2048;
303 //public static const int MEMCTX_TASK = 1;
304 //public static const int OLEACTIVATEAUTO = 3;
305 //public static const int OLEACTIVATEDOUBLECLICK = 2;
306 //public static const int OLEACTIVATEGETFOCUS = 1;
307 //public static const int OLEACTIVATEMANUAL = 0;
308 //public static const int OLEAUTOMATIC = 0;
309 //public static const int OLECHANGED = 0;
310 public static const int OLECLOSE_NOSAVE = 1;
311 //public static const int OLECLOSE_PROMPTSAVE = 2;
312 public static const int OLECLOSE_SAVEIFDIRTY = 0;
313 //public static const int OLECLOSED = 2;
314 //public static const int OLECONTF_EMBEDDINGS = 1;
315 //public static const int OLECONTF_LINKS = 2;
316 //public static const int OLECONTF_ONLYIFRUNNING = 16;
317 //public static const int OLECONTF_ONLYUSER = 8;
318 //public static const int OLECONTF_OTHERS = 4;
319 //public static const int OLEDEACTIVATEMANUAL = 1;
320 //public static const int OLEDEACTIVATEONLOSEFOCUS = 0;
321 //public static const int OLEDECBORDER = 1;
322 //public static const int OLEDECBORDERANDNIBS = 3;
323 //public static const int OLEDECNIBS = 2;
324 //public static const int OLEDECNONE = 0;
325 //public static const int OLEDISPLAYCONTENT = 0;
326 //public static const int OLEDISPLAYICON = 1;
327 //public static const int OLEEITHER = 2;
328 public static const int OLEEMBEDDED = 1;
329 //public static const int OLEFROZEN = 1;
330 public static const int OLEIVERB_DISCARDUNDOSTATE = -6;
331 //public static const int OLEIVERB_HIDE = -3;
332 public static const int OLEIVERB_INPLACEACTIVATE = -5;
333 //public static const int OLEIVERB_OPEN = -2;
334 public static const int OLEIVERB_PRIMARY = 0;
335 //public static const int OLEIVERB_PROPERTIES = -7;
336 //public static const int OLEIVERB_SHOW = -1;
337 //public static const int OLEIVERB_UIACTIVATE = -4;
338 public static const int OLELINKED = 0;
339 //public static const int OLEMANUAL = 2;
340 //public static const int OLEMISC_ACTIVATEWHENVISIBLE = 256;
341 //public static const int OLEMISC_ACTSLIKEBUTTON = 4096;
342 //public static const int OLEMISC_ACTSLIKELABEL = 8192;
343 //public static const int OLEMISC_ALIGNABLE = 32768;
344 //public static const int OLEMISC_ALWAYSRUN = 2048;
345 //public static const int OLEMISC_CANLINKBYOLE1 = 32;
346 //public static const int OLEMISC_CANTLINKINSIDE = 16;
347 //public static const int OLEMISC_IGNOREACTIVATEWHENVISIBLE = 524288;
348 //public static const int OLEMISC_IMEMODE = 262144;
349 //public static const int OLEMISC_INSERTNOTREPLACE = 4;
350 //public static const int OLEMISC_INSIDEOUT = 128;
351 //public static const int OLEMISC_INVISIBLEATRUNTIME = 1024;
352 //public static const int OLEMISC_ISLINKOBJECT = 64;
353 //public static const int OLEMISC_NOUIACTIVATE = 16384;
354 //public static const int OLEMISC_ONLYICONIC = 2;
355 //public static const int OLEMISC_RECOMPOSEONRESIZE = 1;
356 //public static const int OLEMISC_RENDERINGISDEVICEINDEPENDENT = 512;
357 //public static const int OLEMISC_SETCLIENTSITEFIRST = 131072;
358 //public static const int OLEMISC_SIMPLEFRAME = 65536;
359 //public static const int OLEMISC_STATIC = 8;
360 //public static const int OLEMISC_SUPPORTSMULTILEVELUNDO = 2097152;
361 //public static const int OLEMISC_WANTSTOMENUMERGE = 1048576;
362 //public static const int OLENONE = 3;
363 //public static const int OLERENAMED = 3;
364 //public static const int OLERENDER_ASIS = 3;
365 public static const int OLERENDER_DRAW = 1;
366 //public static const int OLERENDER_FORMAT = 2;
367 //public static const int OLERENDER_NONE = 0;
368 //public static const int OLESAVED = 1;
369 //public static const int OLESIZEAUTOSIZE = 2;
370 //public static const int OLESIZECLIP = 0;
371 //public static const int OLESIZESTRETCH = 1;
372 //public static const int OLESIZEZOOM = 3;
373 //public static const int OLEWHICHMK_CONTAINER = 1;
374 //public static const int OLEWHICHMK_OBJFULL = 3;
375 //public static const int OLEWHICHMK_OBJREL = 2;
376 public static const int S_FALSE = 1;
377 public static const int S_OK = 0;
378 public static const int STG_E_FILENOTFOUND = 0x80030002;
379 public static const int STG_S_CONVERTED = 0x00030200;
380 //public static const int STGC_CONSOLIDATE = 8;
381 //public static const int STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4;
382 public static const int STGC_DEFAULT = 0;
383 //public static const int STGC_ONLYIFCURRENT = 2;
384 //public static const int STGC_OVERWRITE = 1;
385 public static const int STGM_CONVERT = 0x00020000;
386 public static const int STGM_CREATE = 0x00001000;
387 public static const int STGM_DELETEONRELEASE = 0x04000000;
388 public static const int STGM_DIRECT = 0x00000000;
389 public static const int STGM_DIRECT_SWMR = 0x00400000;
390 public static const int STGM_FAILIFTHERE = 0x00000000;
391 public static const int STGM_NOSCRATCH = 0x00100000;
392 public static const int STGM_NOSNAPSHOT = 0x00200000;
393 public static const int STGM_PRIORITY = 0x00040000;
394 public static const int STGM_READ = 0x00000000;
395 public static const int STGM_READWRITE = 0x00000002;
396 public static const int STGM_SHARE_DENY_NONE = 0x00000040;
397 public static const int STGM_SHARE_DENY_READ = 0x00000030;
398 public static const int STGM_SHARE_DENY_WRITE = 0x00000020;
399 public static const int STGM_SHARE_EXCLUSIVE = 0x00000010;
400 public static const int STGM_SIMPLE = 0x08000000;
401 public static const int STGM_TRANSACTED = 0x00010000;
402 public static const int STGM_WRITE = 0x00000001;
403 public static const int STGTY_STORAGE = 1;
404 public static const int STGTY_STREAM = 2;
405 public static const int STGTY_LOCKBYTES = 3;
406 public static const int STGTY_PROPERTY = 4;
407 //public static const int TYMED_ENHMF = 64;
408 //public static const int TYMED_FILE = 2;
409 //public static const int TYMED_GDI = 16;
410 public static const int TYMED_HGLOBAL = 1;
411 //public static const int TYMED_ISTORAGE = 8;
412 //public static const int TYMED_ISTREAM = 4;
413 //public static const int TYMED_MFPICT = 32;
414 //public static const int TYMED_NULL = 0;
415 public static const short DISPATCH_METHOD = 0x1;
416 public static const short DISPATCH_PROPERTYGET = 0x2;
417 public static const short DISPATCH_PROPERTYPUT = 0x4;
418 public static const short DISPATCH_PROPERTYPUTREF = 0x8;
419 //public static const short DISPID_CONSTRUCTOR = -6;
420 //public static const short DISPID_DESTRUCTOR = -7;
421 //public static const short DISPID_EVALUATE = -5;
422 //public static const short DISPID_NEWENUM = -4;
423 public static const short DISPID_PROPERTYPUT = -3;
424 //public static const short DISPID_UNKNOWN = -1;
425 //public static const short DISPID_VALUE = 0;
426 public static const short VT_BOOL = 11;
427 public static const short VT_BSTR = 8;
428 public static const short VT_BYREF = 16384;
429 public static const short VT_CY = 6;
430 public static const short VT_DATE = 7;
431 public static const short VT_DISPATCH = 9;
432 public static const short VT_EMPTY = 0;
433 public static const short VT_ERROR = 10;
434 public static const short VT_I1 = 16;
435 public static const short VT_I2 = 2;
436 public static const short VT_I4 = 3;
437 public static const short VT_I8 = 20;
438 public static const short VT_NULL = 1;
439 public static const short VT_R4 = 4;
440 public static const short VT_R8 = 5;
441 public static const short VT_UI1 = 17;
442 public static const short VT_UI2 = 18;
443 public static const short VT_UI4 = 19;
444 public static const short VT_UNKNOWN = 13;
445 public static const short VT_VARIANT = 12;
446 public static const short VARIANT_TRUE = -1;
447 public static const short VARIANT_FALSE = 0;
448
449
450 // alias org.eclipse.swt.internal.ole.win32.comapi.
451 // public static GUID* IIDFromString(String lpsz) {
452 // GUID* lpiid = new GUID();
453 // if (COM.IIDFromString(Converter.StrToWCHARz(lpsz), lpiid) == COM.S_OK)
454 // return lpiid;
455 // return null;
456 // }
457
458 alias COMAPI.CLSIDFromProgID CLSIDFromProgID;
459 alias COMAPI.CLSIDFromString CLSIDFromString;
460 alias COMAPI.CoCreateInstance CoCreateInstance;
461 alias COMAPI.CoFreeUnusedLibraries CoFreeUnusedLibraries;
462 alias COMAPI.CoGetClassObject CoGetClassObject;
463 alias COMAPI.CoLockObjectExternal CoLockObjectExternal;
464 alias COMAPI.CoTaskMemAlloc CoTaskMemAlloc;
465 alias COMAPI.CoTaskMemFree CoTaskMemFree;
466 alias COMAPI.CreateStdAccessibleObject CreateStdAccessibleObject;
467 alias COMAPI.CreateStreamOnHGlobal CreateStreamOnHGlobal;
468 alias COMAPI.DoDragDrop DoDragDrop;
469 alias COMAPI.GetClassFile GetClassFile;
470 alias COMAPI.IIDFromString IIDFromString;
471 alias COMAPI.IsEqualGUID IsEqualGUID;
472 alias COMAPI.LresultFromObject LresultFromObject;
473 alias COMAPI.OleCreate OleCreate;
474 alias COMAPI.OleCreateFromFile OleCreateFromFile;
475 alias COMAPI.OleCreatePropertyFrame OleCreatePropertyFrame;
476 alias COMAPI.OleDraw OleDraw;
477 alias COMAPI.OleFlushClipboard OleFlushClipboard;
478 alias COMAPI.OleGetClipboard OleGetClipboard;
479 alias COMAPI.OleIsCurrentClipboard OleIsCurrentClipboard;
480 alias COMAPI.OleIsRunning OleIsRunning;
481 alias COMAPI.OleLoad OleLoad;
482 alias COMAPI.OleRun OleRun;
483 alias COMAPI.OleSave OleSave;
484 alias COMAPI.OleSetClipboard OleSetClipboard;
485 alias COMAPI.OleSetContainedObject OleSetContainedObject;
486 alias COMAPI.OleSetMenuDescriptor OleSetMenuDescriptor;
487 alias COMAPI.OleTranslateColor OleTranslateColor;
488 alias COMAPI.ProgIDFromCLSID ProgIDFromCLSID;
489 alias COMAPI.RegisterDragDrop RegisterDragDrop;
490 alias COMAPI.ReleaseStgMedium ReleaseStgMedium;
491 alias COMAPI.RevokeDragDrop RevokeDragDrop;
492 alias COMAPI.SHDoDragDrop SHDoDragDrop;
493 alias COMAPI.StgCreateDocfile StgCreateDocfile;
494 alias COMAPI.StgIsStorageFile StgIsStorageFile;
495 alias COMAPI.StgOpenStorage StgOpenStorage;
496 alias COMAPI.StringFromCLSID StringFromCLSID;
497 alias COMAPI.SysAllocString SysAllocString;
498 alias COMAPI.SysFreeString SysFreeString;
499 alias COMAPI.SysStringByteLen SysStringByteLen;
500 alias COMAPI.VariantChangeType VariantChangeType;
501 alias COMAPI.VariantClear VariantClear;
502 alias COMAPI.VariantCopy VariantCopy;
503 alias COMAPI.VariantInit VariantInit;
504 alias COMAPI.WriteClassStg WriteClassStg;
505
506 /**
507 * <Shawn Liu>
508 * VtbCall partially kept, use VtbCall instead of automation can promote performace
509 * and VtbCall doesn't need prototype of interface declaration
510 */
511
512 public static int VtblCall(int fnNumber, void* ppVtbl) {
513 Function1 fn = cast(Function1)(*cast(int **)ppVtbl)[fnNumber];
514 return fn(ppVtbl);
515 }
516
517 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0){
518 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
519 return fn(ppVtbl, arg0);
520 }
521
522 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1){
523 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
524 return fn(ppVtbl, arg0, arg1);
525 }
526
527 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2){
528 Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber];
529 return fn(ppVtbl, arg0, arg1, arg2);
530 }
531 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3){
532 Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber];
533 return fn(ppVtbl, arg0, arg1, arg2, arg3);
534 }
535
536 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4){
537 Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber];
538 return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4);
539 }
540
541 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5){
542 Function7 fn = cast(Function7)(*cast(int **)ppVtbl)[fnNumber];
543 return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
544 }
545
546 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6){
547 Function8 fn = cast(Function8)(*cast(int **)ppVtbl)[fnNumber];
548 return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
549 }
550
551 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7){
552 Function9 fn = cast(Function9)(*cast(int **)ppVtbl)[fnNumber];
553 return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
554 }
555
556 /*
557 public static int VtblCall(int fnNumber, void* ppVtbl) {
558 Function1 fn = cast(Function1)(*cast(int **)ppVtbl)[fnNumber];
559 return fn(ppVtbl);
560 }
561
562 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0){
563 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
564 return fn(ppVtbl, arg0);
565 }
566
567 public static int VtblCall(int fnNumber, void* ppVtbl, void* arg0){
568 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
569 return fn(ppVtbl, cast(int)arg0);
570 }
571
572 public static int VtblCall(int fnNumber, void* ppVtbl, wchar* arg0) {
573 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
574 return fn(ppVtbl, cast(int)arg0);
575 }
576 public static int VtblCall(int fnNumber, void* ppVtbl, wchar* arg0, wchar* arg1){
577 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
578 return fn(ppVtbl, cast(int)arg0, cast(int)arg1);
579 }
580 public static int VtblCall(int fnNumber, void* ppVtbl, wchar* arg0, int arg1) {
581 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
582 return fn(ppVtbl, cast(int)arg0, arg1);
583 }
584 public static int VtblCall(int fnNumber, void* ppVtbl, wchar* arg0, int arg1, int arg2, int arg3, int[] arg4) {
585 Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber];
586 return fn(ppVtbl, cast(int)arg0, arg1, arg2, arg3, cast(int)cast(int*)arg4);
587 }
588 public static int VtblCall(int fnNumber, void* ppVtbl, wchar* arg0, int arg1, int arg2, int arg3, int arg4, int[] arg5) {
589 Function7 fn = cast(Function7)(*cast(int **)ppVtbl)[fnNumber];
590 return fn(ppVtbl, cast(int)arg0, arg1, arg2, arg3, arg4, cast(int)cast(int*)arg5);
591 }
592 public static int VtblCall(int fnNumber, void* ppVtbl, int[] arg0) {
593 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
594 return fn(ppVtbl, cast(int)cast(int*)arg0);
595 }
596 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int[] arg1) {
597 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
598 return fn(ppVtbl, arg0, cast(int)cast(int*)arg1);
599 }
600 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1) {
601 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
602 return fn(ppVtbl, arg0, arg1);
603 }
604 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int[] arg2) {
605 Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber];
606 return fn(ppVtbl, arg0, arg1, cast(int)cast(int*)arg2);
607 }
608 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2) {
609 Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber];
610 return fn(ppVtbl, arg0, arg1, arg2);
611 }
612 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int[] arg3) {
613 Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber];
614 return fn(ppVtbl, arg0, arg1, arg2, cast(int)cast(int*)arg3);
615 }
616 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, DVTARGETDEVICE* arg2, SIZE* arg3) {
617 Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber];
618 return fn(ppVtbl, arg0, arg1, cast(int)(arg2), cast(int)(arg3));
619 }
620 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, GUID* arg2, int arg3, int[] arg4) {
621 Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber];
622 return fn(ppVtbl, arg0, arg1, cast(int)(arg2), arg3, cast(int)cast(int*)arg4);
623 }
624 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, FORMATETC* arg1, int[] arg2) {
625 Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber];
626 return fn(ppVtbl, arg0, cast(int)(arg1), cast(int)cast(int*)arg2);
627 }
628 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, GUID* arg1) {
629 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
630 return fn(ppVtbl, arg0, cast(int)(arg1));
631 }
632 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, GUID* arg1, int arg2, int arg3) {
633 Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber];
634 return fn(ppVtbl, arg0, cast(int)(arg1), arg2, arg3);
635 }
636 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, GUID* arg1, int arg2, int arg3, DISPPARAMS* arg4, int arg5, EXCEPINFO* arg6, int[] arg7) {
637 Function9 fn = cast(Function9)(*cast(int **)ppVtbl)[fnNumber];
638 return fn(ppVtbl, arg0, cast(int)(arg1), arg2, arg3, cast(int)(arg4), arg5, cast(int)(arg6), cast(int)cast(int*)arg7);
639 }
640 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, STATSTG* arg1, int[] arg2) {
641 Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber];
642 return fn(ppVtbl, arg0, cast(int)(arg1), cast(int)cast(int*)arg2);
643 }
644 public static int VtblCall(int fnNumber, void* ppVtbl, MSG* arg0) {
645 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
646 return fn(ppVtbl, cast(int)(arg0));
647 }
648 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, MSG* arg1, int arg2, int arg3, int arg4, RECT* arg5) {
649 Function7 fn = cast(Function7)(*cast(int **)ppVtbl)[fnNumber];
650 return fn(ppVtbl, arg0, cast(int)(arg1), arg2, arg3, arg4, cast(int)(arg5));
651 }
652 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, SIZE* arg1) {
653 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
654 return fn(ppVtbl, arg0, cast(int)(arg1));
655 }
656
657 // TODO: the type of BOOL ???
658 // conflict with VtblCall(int, int, int, int);
659 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, bool arg1) {
660 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
661 return fn(ppVtbl, arg0, cast(int)arg1);
662 }
663 public static int VtblCall(int fnNumber, void* ppVtbl, CAUUID* arg0) {
664 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
665 return fn(ppVtbl, cast(int)(arg0));
666 }
667 public static int VtblCall(int fnNumber, void* ppVtbl, CONTROLINFO* arg0) {
668 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
669 return fn(ppVtbl, cast(int)(arg0));
670 }
671 public static int VtblCall(int fnNumber, void* ppVtbl, FORMATETC* arg0) {
672 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
673 return fn(ppVtbl, cast(int)(arg0));
674 }
675 public static int VtblCall(int fnNumber, void* ppVtbl, FORMATETC* arg0, STGMEDIUM* arg1) {
676 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
677 return fn(ppVtbl, cast(int)(arg0), cast(int)(arg1));
678 }
679 // TODO: BOOL type ???
680 public static int VtblCall(int fnNumber, void* ppVtbl, FORMATETC* arg0, STGMEDIUM* arg1, int arg2) {
681 Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber];
682 return fn(ppVtbl, cast(int)(arg0), cast(int)(arg1), arg2);
683 }
684 public static int VtblCall(int fnNumber, void* ppVtbl, GUID* arg0) {
685 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
686 return fn(ppVtbl, cast(int)(arg0));
687 }
688
689 public static int VtblCall(int fnNumber, void* ppVtbl, GUID* arg0, int[] arg1) {
690 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
691 return fn(ppVtbl, cast(int)(arg0), cast(int)cast(int*)arg1);
692 }
693
694 public static int VtblCall(int fnNumber, void* ppVtbl, GUID* arg0, int arg1, int arg2, int arg3, int[] arg4) {
695 Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber];
696 return fn(ppVtbl, cast(int)(arg0), arg1, arg2, arg3, cast(int)cast(int*)arg4);
697 }
698 public static int VtblCall(int fnNumber, void* ppVtbl, GUID* arg0, int arg1, int arg2, int arg3, int arg4) {
699 Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber];
700 return fn(ppVtbl, cast(int)(arg0), arg1, arg2, arg3, arg4);
701 }
702 public static int VtblCall(int fnNumber, void* ppVtbl, GUID* arg0, int arg1, OLECMD* arg2, OLECMDTEXT* arg3) {
703 Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber];
704 return fn(ppVtbl, cast(int)(arg0), arg1, cast(int)(arg2), cast(int)(arg3));
705 }
706 public static int VtblCall(int fnNumber, void* ppVtbl, LICINFO* arg0) {
707 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
708 return fn(ppVtbl, cast(int)(arg0));
709 }
710 public static int VtblCall(int fnNumber, void* ppVtbl, RECT* arg0, int arg1, int arg2) {
711 Function4 fn = cast(Function4)(*cast(int **)ppVtbl)[fnNumber];
712 return fn(ppVtbl, cast(int)(arg0), arg1, arg2);
713 }
714 public static int VtblCall(int fnNumber, void* ppVtbl, RECT* arg0, RECT* arg1) {
715 Function3 fn = cast(Function3)(*cast(int **)ppVtbl)[fnNumber];
716 return fn(ppVtbl, cast(int)(arg0), cast(int)(arg1));
717 }
718 public static int VtblCall(int fnNumber, void* ppVtbl, RECT* arg0) {
719 Function2 fn = cast(Function2)(*cast(int **)ppVtbl)[fnNumber];
720 return fn(ppVtbl, cast(int)(arg0));
721 }
722 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int[] arg1, int[] arg2, int[] arg3, int[] arg4) {
723 Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber];
724 return fn(ppVtbl, arg0, cast(int)cast(int*)arg1, cast(int)cast(int*)arg2, cast(int)cast(int*)arg3, cast(int)cast(int*)arg4);
725 }
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, cast(int)cast(int*)arg1, arg2, cast(int)cast(int*)arg3);
729 }
730
731
732 // Start ACCESSIBILITY
733 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3) {
734 Function5 fn = cast(Function5)(*cast(int **)ppVtbl)[fnNumber];
735 return fn(ppVtbl, arg0, arg1, arg2, arg3);
736 }
737 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4) {
738 Function6 fn = cast(Function6)(*cast(int **)ppVtbl)[fnNumber];
739 return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4);
740 }
741 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5) {
742 Function7 fn = cast(Function7)(*cast(int **)ppVtbl)[fnNumber];
743 return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
744 }
745 public static int VtblCall(int fnNumber, void* ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7) {
746 Function9 fn = cast(Function9)(*cast(int **)ppVtbl)[fnNumber];
747 return fn(ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
748 }
749
750 */
751
752
753 public static const int CHILDID_SELF = 0;
754 public static const int CO_E_OBJNOTCONNECTED = 0x800401FD;
755
756 //public static const int ROLE_SYSTEM_TITLEBAR = 0x1;
757 public static const int ROLE_SYSTEM_MENUBAR = 0x2;
758 public static const int ROLE_SYSTEM_SCROLLBAR = 0x3;
759 //public static const int ROLE_SYSTEM_GRIP = 0x4;
760 //public static const int ROLE_SYSTEM_SOUND = 0x5;
761 //public static const int ROLE_SYSTEM_CURSOR = 0x6;
762 //public static const int ROLE_SYSTEM_CARET = 0x7;
763 //public static const int ROLE_SYSTEM_ALERT = 0x8;
764 public static const int ROLE_SYSTEM_WINDOW = 0x9;
765 public static const int ROLE_SYSTEM_CLIENT = 0xa;
766 public static const int ROLE_SYSTEM_MENUPOPUP = 0xb;
767 public static const int ROLE_SYSTEM_MENUITEM = 0xc;
768 public static const int ROLE_SYSTEM_TOOLTIP = 0xd;
769 //public static const int ROLE_SYSTEM_APPLICATION = 0xe;
770 //public static const int ROLE_SYSTEM_DOCUMENT = 0xf;
771 //public static const int ROLE_SYSTEM_PANE = 0x10;
772 //public static const int ROLE_SYSTEM_CHART = 0x11;
773 public static const int ROLE_SYSTEM_DIALOG = 0x12;
774 //public static const int ROLE_SYSTEM_BORDER = 0x13;
775 //public static const int ROLE_SYSTEM_GROUPING = 0x14;
776 public static const int ROLE_SYSTEM_SEPARATOR = 0x15;
777 public static const int ROLE_SYSTEM_TOOLBAR = 0x16;
778 //public static const int ROLE_SYSTEM_STATUSBAR = 0x17;
779 public static const int ROLE_SYSTEM_TABLE = 0x18;
780 public static const int ROLE_SYSTEM_COLUMNHEADER = 0x19;
781 public static const int ROLE_SYSTEM_ROWHEADER = 0x1a;
782 //public static const int ROLE_SYSTEM_COLUMN = 0x1b;
783 //public static const int ROLE_SYSTEM_ROW = 0x1c;
784 public static const int ROLE_SYSTEM_CELL = 0x1d;
785 public static const int ROLE_SYSTEM_LINK = 0x1e;
786 //public static const int ROLE_SYSTEM_HELPBALLOON = 0x1f;
787 //public static const int ROLE_SYSTEM_CHARACTER = 0x20;
788 public static const int ROLE_SYSTEM_LIST = 0x21;
789 public static const int ROLE_SYSTEM_LISTITEM = 0x22;
790 public static const int ROLE_SYSTEM_OUTLINE = 0x23;
791 public static const int ROLE_SYSTEM_OUTLINEITEM = 0x24;
792 public static const int ROLE_SYSTEM_PAGETAB = 0x25;
793 //public static const int ROLE_SYSTEM_PROPERTYPAGE = 0x26;
794 //public static const int ROLE_SYSTEM_INDICATOR = 0x27;
795 //public static const int ROLE_SYSTEM_GRAPHIC = 0x28;
796 public static const int ROLE_SYSTEM_STATICTEXT = 0x29;
797 public static const int ROLE_SYSTEM_TEXT = 0x2a;
798 public static const int ROLE_SYSTEM_PUSHBUTTON = 0x2b;
799 public static const int ROLE_SYSTEM_CHECKBUTTON = 0x2c;
800 public static const int ROLE_SYSTEM_RADIOBUTTON = 0x2d;
801 public static const int ROLE_SYSTEM_COMBOBOX = 0x2e;
802 //public static const int ROLE_SYSTEM_DROPLIST = 0x2f;
803 public static const int ROLE_SYSTEM_PROGRESSBAR = 0x30;
804 //public static const int ROLE_SYSTEM_DIAL = 0x31;
805 //public static const int ROLE_SYSTEM_HOTKEYFIELD = 0x32;
806 public static const int ROLE_SYSTEM_SLIDER = 0x33;
807 //public static const int ROLE_SYSTEM_SPINBUTTON = 0x34;
808 //public static const int ROLE_SYSTEM_DIAGRAM = 0x35;
809 //public static const int ROLE_SYSTEM_ANIMATION = 0x36;
810 //public static const int ROLE_SYSTEM_EQUATION = 0x37;
811 //public static const int ROLE_SYSTEM_BUTTONDROPDOWN = 0x38;
812 //public static const int ROLE_SYSTEM_BUTTONMENU = 0x39;
813 //public static const int ROLE_SYSTEM_BUTTONDROPDOWNGRID = 0x3a;
814 //public static const int ROLE_SYSTEM_WHITESPACE = 0x3b;
815 public static const int ROLE_SYSTEM_PAGETABLIST = 0x3c;
816 //public static const int ROLE_SYSTEM_CLOCK = 0x3d;
817
818 public static const int STATE_SYSTEM_NORMAL = 0;
819 //public static const int STATE_SYSTEM_UNAVAILABLE = 0x1;
820 public static const int STATE_SYSTEM_SELECTED = 0x2;
821 public static const int STATE_SYSTEM_FOCUSED = 0x4;
822 public static const int STATE_SYSTEM_PRESSED = 0x8;
823 public static const int STATE_SYSTEM_CHECKED = 0x10;
824 public static const int STATE_SYSTEM_MIXED = 0x20;
825 //public static const int STATE_SYSTEM_INDETERMINATE = STATE_SYSTEM_MIXED;
826 public static const int STATE_SYSTEM_READONLY = 0x40;
827 public static const int STATE_SYSTEM_HOTTRACKED = 0x80;
828 //public static const int STATE_SYSTEM_DEFAULT = 0x100;
829 public static const int STATE_SYSTEM_EXPANDED = 0x200;
830 public static const int STATE_SYSTEM_COLLAPSED = 0x400;
831 public static const int STATE_SYSTEM_BUSY = 0x800;
832 //public static const int STATE_SYSTEM_FLOATING = 0x1000;
833 //public static const int STATE_SYSTEM_MARQUEED = 0x2000;
834 //public static const int STATE_SYSTEM_ANIMATED = 0x4000;
835 public static const int STATE_SYSTEM_INVISIBLE = 0x8000;
836 public static const int STATE_SYSTEM_OFFSCREEN = 0x10000;
837 public static const int STATE_SYSTEM_SIZEABLE = 0x20000;
838 //public static const int STATE_SYSTEM_MOVEABLE = 0x40000;
839 //public static const int STATE_SYSTEM_SELFVOICING = 0x80000;
840 public static const int STATE_SYSTEM_FOCUSABLE = 0x100000;
841 public static const int STATE_SYSTEM_SELECTABLE = 0x200000;
842 public static const int STATE_SYSTEM_LINKED = 0x400000;
843 //public static const int STATE_SYSTEM_TRAVERSED = 0x800000;
844 public static const int STATE_SYSTEM_MULTISELECTABLE = 0x1000000;
845 //public static const int STATE_SYSTEM_EXTSELECTABLE = 0x2000000;
846 //public static const int STATE_SYSTEM_ALERT_LOW = 0x4000000;
847 //public static const int STATE_SYSTEM_ALERT_MEDIUM = 0x8000000;
848 //public static const int STATE_SYSTEM_ALERT_HIGH = 0x10000000;
849 //public static const int STATE_SYSTEM_PROTECTED = 0x20000000;
850 //public static const int STATE_SYSTEM_VALID = 0x3fffffff;
851
852 /* End ACCESSIBILITY */
853
854 }
855
856 /**
857 * <Shawn> difference between WCHARzToStr(pwstr, -1) :
858 * BSTRToStr() internally call WCHARzToStr(pwstr, length) with length set,
859 * instead to determine the null ended, this mean BSTRToStr() can get string
860 * which has embedded null characters.
861 */
862 // BSTR is aliased to wchar*
863 // Note : Free the "bstr" memory if freeTheString is true, default false
864 String BSTRToStr( /*BSTR*/ inout wchar* bstr, bool freeTheString = false){
865 if(bstr is null) return null;
866 int size = (SysStringByteLen(bstr) + 1)/wchar.sizeof;
867 String result = WCHARzToStr(bstr, size);
868 if(freeTheString) {
869 // free the string and set ptr to null
870 SysFreeString(bstr);
871 bstr = null;
872 }
873 return result;
874 }
875
876
877
878
879