Mercurial > projects > dwt-win
annotate dwt/internal/ole/win32/COMAPI.d @ 213:36f5cb12e1a2
Update to SWT 3.4M7
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 17 May 2008 17:34:28 +0200 |
parents | 07e8963537b7 |
children | 41a9fce66f7f |
rev | line source |
---|---|
97 | 1 /* |
2 * All COM APIs required by DWT, all APIs prototype copied from MSDN 2003 | |
3 * don't import this module directly, import std.internal.ole.win32.com instead | |
4 * | |
5 * author : Shawn Liu | |
6 */ | |
7 | |
8 | |
9 module dwt.internal.ole.win32.COMAPI; | |
10 | |
11 | |
12 //private import std.c.windows.windows; | |
13 //private import std.c.windows.com; | |
14 private import dwt.internal.win32.WINTYPES; | |
15 private import dwt.internal.ole.win32.COMTYPES; | |
16 private import dwt.internal.ole.win32.OBJIDL; | |
17 private import dwt.internal.ole.win32.OLEIDL; | |
18 private import dwt.internal.ole.win32.OAIDL; | |
19 private import dwt.internal.ole.win32.extras; | |
20 | |
21 extern(Windows){ | |
22 | |
23 WINOLEAPI CreateStreamOnHGlobal( | |
24 HGLOBAL hGlobal, //Memory handle for the stream object | |
25 BOOL fDeleteOnRelease, //Whether to free memory when the object | |
26 // is released | |
27 LPSTREAM * ppstm //Address of output variable that | |
28 // receives the IStream interface pointer | |
29 ); | |
30 HRESULT CLSIDFromProgID( | |
31 LPCOLESTR lpszProgID, | |
32 LPCLSID pclsid | |
33 ); | |
34 HRESULT CLSIDFromString( | |
35 LPOLESTR lpsz, | |
36 LPCLSID pclsid | |
37 ); | |
38 STDAPI CoCreateInstance( | |
39 REFCLSID rclsid, | |
40 LPUNKNOWN pUnkOuter, | |
41 DWORD dwClsContext, | |
42 REFIID riid, | |
43 LPVOID * ppv | |
44 ); | |
45 void CoFreeUnusedLibraries(); | |
46 STDAPI CoGetClassObject( | |
47 REFCLSID rclsid, | |
48 DWORD dwClsContext, | |
49 COSERVERINFO * pServerInfo, | |
50 REFIID riid, | |
51 LPVOID * ppv | |
52 ); | |
53 STDAPI CoLockObjectExternal( | |
54 LPUNKNOWN pUnk, | |
55 BOOL fLock, | |
56 BOOL fLastUnlockReleases | |
57 ); | |
58 LPVOID CoTaskMemAlloc( | |
59 ULONG cb | |
60 ); | |
61 void CoTaskMemFree( | |
62 void * pv | |
63 ); | |
64 | |
65 WINOLEAPI DoDragDrop( | |
66 LPDATAOBJECT pDataObject, //Pointer to the data object | |
67 LPDROPSOURCE pDropSource, //Pointer to the source | |
68 DWORD dwOKEffect, //Effects allowed by the source | |
69 DWORD * pdwEffect //Pointer to effects on the source | |
70 ); | |
71 | |
72 WINOLEAPI GetClassFile( | |
73 LPCWSTR szFileName, | |
74 CLSID * pclsid | |
75 ); | |
76 WINOLEAPI IIDFromString( | |
77 LPOLESTR lpsz, | |
78 LPIID lpiid | |
79 ); | |
80 BOOL IsEqualGUID( | |
81 REFGUID rguid1, | |
82 REFGUID rguid2 | |
83 ); | |
84 WINOLEAPI OleCreate( | |
85 REFCLSID rclsid, //CLSID of embedded object to be created | |
86 REFIID riid, //Reference to the identifier of the interface | |
87 // used to communicate with new object | |
88 DWORD renderopt, //RENDEROPT value indicating cached capabilities | |
89 FORMATETC * pFormatEtc, | |
90 //Pointer to a FORMATETC structure | |
91 IOleClientSite * pClientSite, | |
92 //Pointer to request services from the container | |
93 LPSTORAGE pStg, //Pointer to storage for the object | |
94 void ** ppvObject //Address of output variable that receives the | |
95 // interface pointer requested in riid | |
96 ); | |
97 WINOLEAPI OleCreateFromFile( | |
98 REFCLSID rclsid, //Reserved. Must be CLSID_NULL | |
99 LPCOLESTR lpszFileName, //Pointer to full path of file used to | |
100 // create object | |
101 REFIID riid, //Reference to the identifier of the | |
102 // interface to be used to communicate with | |
103 // new object | |
104 DWORD renderopt, //Value from OLERENDER | |
105 LPFORMATETC pFormatEtc, //Pointer to the FORMATETC structure | |
106 LPOLECLIENTSITE pClientSite, | |
107 //Pointer to an interface | |
108 LPSTORAGE pStg, //Pointer tothe interface to be used as | |
109 // object storage | |
110 LPVOID * ppvObj //Address of output variable that | |
111 // receives the interface pointer requested | |
112 // in riid | |
113 ); | |
114 | |
115 STDAPI OleCreatePropertyFrame( | |
116 HWND hwndOwner, //Parent window of property sheet dialog box | |
117 UINT x, //Horizontal position for dialog box | |
118 UINT y, //Vertical position for dialog box | |
119 LPCOLESTR lpszCaption, | |
120 //Pointer to the dialog box caption | |
121 ULONG cObjects, //Number of object pointers in lplpUnk | |
122 LPUNKNOWN * lplpUnk, | |
123 //Pointer to the objects for property sheet | |
124 ULONG cPages, //Number of property pages in lpPageClsID | |
125 LPCLSID lpPageClsID, | |
126 //Array of CLSIDs for each property page | |
127 LCID lcid, //Locale identifier for property sheet locale | |
128 DWORD dwReserved, //Reserved | |
129 LPVOID lpvReserved //Reserved | |
130 ); | |
131 WINOLEAPI OleDraw( | |
132 LPUNKNOWN pUnk, //Pointer to the view object to be drawn | |
133 DWORD dwAspect, //How the object is to be represented | |
134 HDC hdcDraw, //Device context on which to draw | |
135 LPCRECT lprcBounds //Pointer to the rectangle in which the object | |
136 // is drawn | |
137 ); | |
138 WINOLEAPI OleFlushClipboard(); | |
139 WINOLEAPI OleGetClipboard( | |
140 LPDATAOBJECT * ppDataObj //Address of output variable that | |
141 // receives the IDataObject interface | |
142 // pointer | |
143 ); | |
144 WINOLEAPI OleIsCurrentClipboard( | |
145 LPDATAOBJECT pDataObject //Pointer to the data object previously | |
146 // copied or cut | |
147 ); | |
148 BOOL OleIsRunning( | |
149 LPOLEOBJECT pObject //Pointer to the interface | |
150 ); | |
151 WINOLEAPI OleLoad( | |
152 LPSTORAGE pStg, //Pointer to the storage object from which to | |
153 // load | |
154 REFIID riid, //Reference to the identifier of the interface | |
155 IOleClientSite * pClientSite, | |
156 //Pointer to the client site for the object | |
157 LPVOID * ppvObj //Address of output variable that receives the | |
158 // interface pointer requested in riid | |
159 ); | |
160 WINOLEAPI OleRun( | |
161 LPUNKNOWN pUnknown //Pointer to interface on the object | |
162 ); | |
163 WINOLEAPI OleSave( | |
164 LPPERSISTSTORAGE pPS, //Pointer to the object to be saved | |
165 LPSTORAGE pStg, //Pointer to the destination storage to | |
166 // which pPS is saved | |
167 BOOL fSameAsLoad //Whether the object was loaded from pstg | |
168 // or not | |
169 ); | |
170 WINOLEAPI OleSetClipboard( | |
171 LPDATAOBJECT pDataObj //Pointer to the data object being copied | |
172 // or cut | |
173 ); | |
174 WINOLEAPI OleSetContainedObject( | |
175 LPUNKNOWN pUnk, //Pointer to the interface on the embedded object | |
176 BOOL fContained //Indicates if the object is embedded | |
177 ); | |
178 WINOLEAPI OleSetMenuDescriptor( | |
179 HOLEMENU holemenu, //Handle to the composite menu descriptor | |
180 HWND hwndFrame, //Handle to the container's frame window | |
181 HWND hwndActiveObject, //Handle to the object's in-place | |
182 // activation window | |
183 LPOLEINPLACEFRAME lpFrame, //Pointer to the container's frame | |
184 // window | |
185 LPOLEINPLACEACTIVEOBJECT lpActiveObj | |
186 //Active in-place object | |
187 ); | |
188 STDAPI OleTranslateColor ( | |
189 OLE_COLOR clr, //Color to be converted into a COLORREF | |
190 HPALETTE hpal, //Palette used for conversion | |
191 COLORREF *pcolorref //Pointer to the caller's variable that | |
192 // receives the converted result | |
193 ); | |
194 WINOLEAPI ProgIDFromCLSID( | |
195 REFCLSID clsid, | |
196 LPOLESTR * lplpszProgID | |
197 ); | |
198 | |
199 WINOLEAPI RegisterDragDrop( | |
200 HWND hwnd, //Handle to a window that can accept drops | |
201 LPDROPTARGET pDropTarget | |
202 //Pointer to object that is to be target of drop | |
203 ); | |
204 void ReleaseStgMedium( | |
205 STGMEDIUM * pmedium //Pointer to storage medium to be freed | |
206 ); | |
207 WINOLEAPI RevokeDragDrop( | |
208 HWND hwnd //Handle to a window that can accept drops | |
209 ); | |
213 | 210 HRESULT SHDoDragDrop( |
211 HWND hwnd, | |
212 IDataObject *pdtobj, | |
213 IDropSource *pdsrc, | |
214 DWORD dwEffect, | |
215 DWORD *pdwEffect | |
216 ); | |
97 | 217 HRESULT StgCreateDocfile( |
218 WCHAR* pwcsName, | |
219 DWORD grfMode, | |
220 DWORD reserved, | |
221 LPSTORAGE* ppstgOpen | |
222 ); | |
223 | |
224 WINOLEAPI StgIsStorageFile( | |
225 WCHAR* pwcsName | |
226 ); | |
227 | |
228 HRESULT StgOpenStorage( | |
229 WCHAR* pwcsName, | |
230 LPSTORAGE pstgPriority, | |
231 DWORD grfMode, | |
232 SNB snbExclude, | |
233 DWORD reserved, | |
234 LPSTORAGE * ppstgOpen | |
235 ); | |
236 | |
237 WINOLEAPI StringFromCLSID( | |
238 REFCLSID rclsid, | |
239 LPOLESTR * ppsz | |
240 ); | |
241 BSTR SysAllocString( | |
242 OLECHAR * sz | |
243 ); | |
244 VOID SysFreeString( | |
245 BSTR bstr | |
246 ); | |
247 UINT SysStringByteLen( | |
248 BSTR bstr | |
249 ); | |
250 HRESULT VariantChangeType( | |
251 VARIANTARG * pvargDest, | |
252 VARIANTARG * pvarSrc, | |
253 ushort wFlags, | |
254 VARTYPE vt | |
255 ); | |
256 | |
257 HRESULT VariantClear( | |
258 VARIANTARG * pvarg | |
259 ); | |
260 HRESULT VariantCopy( | |
261 VARIANTARG * pvargDest, | |
262 VARIANTARG * pvargSrc | |
263 ); | |
264 VOID VariantInit( | |
265 VARIANTARG * pvarg | |
266 ); | |
267 WINOLEAPI WriteClassStg( | |
268 LPSTORAGE pStg, | |
269 REFCLSID rclsid | |
270 ); | |
271 | |
272 STDAPI CreateStdAccessibleObject( | |
273 HWND hwnd, | |
274 LONG idObject, | |
275 REFIID riidInterface, | |
276 void** ppvObject | |
277 ); | |
278 LRESULT LresultFromObject( | |
279 REFIID riid, | |
128
07e8963537b7
removed tango_sys_win32 and added all necessary bindings to the dwt.internal.win32 WINTYPES and WINAPI modules
Frank Benoit <benoit@tionex.de>
parents:
97
diff
changeset
|
280 WPARAM wParam, |
97 | 281 LPUNKNOWN pAcc |
282 ); | |
283 | |
284 } // end of comapi |