ReactOS  0.4.13-dev-235-g7373cb3
objbase.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1998-1999 Francois Gouget
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18 
19 #include <rpc.h>
20 #include <rpcndr.h>
21 
22 #ifndef _OBJBASE_H_
23 #define _OBJBASE_H_
24 
25 /*****************************************************************************
26  * Macros to define a COM interface
27  */
28 /*
29  * The goal of the following set of definitions is to provide a way to use the same
30  * header file definitions to provide both a C interface and a C++ object oriented
31  * interface to COM interfaces. The type of interface is selected automatically
32  * depending on the language but it is always possible to get the C interface in C++
33  * by defining CINTERFACE.
34  *
35  * It is based on the following assumptions:
36  * - all COM interfaces derive from IUnknown, this should not be a problem.
37  * - the header file only defines the interface, the actual fields are defined
38  * separately in the C file implementing the interface.
39  *
40  * The natural approach to this problem would be to make sure we get a C++ class and
41  * virtual methods in C++ and a structure with a table of pointer to functions in C.
42  * Unfortunately the layout of the virtual table is compiler specific, the layout of
43  * g++ virtual tables is not the same as that of an egcs virtual table which is not the
44  * same as that generated by Visual C++. There are workarounds to make the virtual tables
45  * compatible via padding but unfortunately the one which is imposed to the WINE emulator
46  * by the Windows binaries, i.e. the Visual C++ one, is the most compact of all.
47  *
48  * So the solution I finally adopted does not use virtual tables. Instead I use inline
49  * non virtual methods that dereference the method pointer themselves and perform the call.
50  *
51  * Let's take Direct3D as an example:
52  *
53  * #define INTERFACE IDirect3D
54  * DECLARE_INTERFACE_(IDirect3D,IUnknown)
55  * {
56  * // *** IUnknown methods *** //
57  * STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID, void**) PURE;
58  * STDMETHOD_(ULONG,AddRef)(THIS) PURE;
59  * STDMETHOD_(ULONG,Release)(THIS) PURE;
60  * // *** IDirect3D methods *** //
61  * STDMETHOD(Initialize)(THIS_ REFIID) PURE;
62  * STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK, LPVOID) PURE;
63  * STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT *, IUnknown *) PURE;
64  * STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL *, IUnknown *) PURE;
65  * STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT *, IUnknown *) PURE;
66  * STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT) PURE;
67  * };
68  * #undef INTERFACE
69  *
70  * #ifdef COBJMACROS
71  * // *** IUnknown methods *** //
72  * #define IDirect3D_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
73  * #define IDirect3D_AddRef(p) (p)->lpVtbl->AddRef(p)
74  * #define IDirect3D_Release(p) (p)->lpVtbl->Release(p)
75  * // *** IDirect3D methods *** //
76  * #define IDirect3D_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
77  * #define IDirect3D_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevice(p,a,b)
78  * #define IDirect3D_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
79  * #define IDirect3D_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
80  * #define IDirect3D_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
81  * #define IDirect3D_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
82  * #endif
83  *
84  * Comments:
85  * - The INTERFACE macro is used in the STDMETHOD macros to define the type of the 'this'
86  * pointer. Defining this macro here saves us the trouble of having to repeat the interface
87  * name everywhere. Note however that because of the way macros work, a macro like STDMETHOD
88  * cannot use 'INTERFACE##_VTABLE' because this would give 'INTERFACE_VTABLE' and not
89  * 'IDirect3D_VTABLE'.
90  * - The DECLARE_INTERFACE declares all the structures necessary for the interface. We have to
91  * explicitly use the interface name for macro expansion reasons again. It defines the list of
92  * methods that are inheritable from this interface. It must be written manually (rather than
93  * using a macro to generate the equivalent code) to avoid macro recursion (which compilers
94  * don't like). It must start with the methods definition of the parent interface so that
95  * method inheritance works properly.
96  * - The 'undef INTERFACE' is here to remind you that using INTERFACE in the following macros
97  * will not work.
98  * - Finally the set of 'IDirect3D_Xxx' macros is a standard set of macros defined to ease access
99  * to the interface methods in C. Unfortunately I don't see any way to avoid having to duplicate
100  * the inherited method definitions there. This time I could have used a trick to use only one
101  * macro whatever the number of parameters but I preferred to have it work the same way as above.
102  * - You probably have noticed that we don't define the fields we need to actually implement this
103  * interface: reference count, pointer to other resources and miscellaneous fields. That's
104  * because these interfaces are just that: interfaces. They may be implemented more than once, in
105  * different contexts and sometimes not even in Wine. Thus it would not make sense to impose
106  * that the interface contains some specific fields.
107  *
108  *
109  * In C this gives:
110  * typedef struct IDirect3DVtbl IDirect3DVtbl;
111  * struct IDirect3D {
112  * IDirect3DVtbl* lpVtbl;
113  * };
114  * struct IDirect3DVtbl {
115  * HRESULT (*QueryInterface)(IDirect3D* me, REFIID riid, LPVOID* ppvObj);
116  * ULONG (*AddRef)(IDirect3D* me);
117  * ULONG (*Release)(IDirect3D* me);
118  * HRESULT (*Initialize)(IDirect3D* me, REFIID a);
119  * HRESULT (*EnumDevices)(IDirect3D* me, LPD3DENUMDEVICESCALLBACK a, LPVOID b);
120  * HRESULT (*CreateLight)(IDirect3D* me, LPDIRECT3DLIGHT* a, IUnknown* b);
121  * HRESULT (*CreateMaterial)(IDirect3D* me, LPDIRECT3DMATERIAL* a, IUnknown* b);
122  * HRESULT (*CreateViewport)(IDirect3D* me, LPDIRECT3DVIEWPORT* a, IUnknown* b);
123  * HRESULT (*FindDevice)(IDirect3D* me, LPD3DFINDDEVICESEARCH a, LPD3DFINDDEVICERESULT b);
124  * };
125  *
126  * #ifdef COBJMACROS
127  * // *** IUnknown methods *** //
128  * #define IDirect3D_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
129  * #define IDirect3D_AddRef(p) (p)->lpVtbl->AddRef(p)
130  * #define IDirect3D_Release(p) (p)->lpVtbl->Release(p)
131  * // *** IDirect3D methods *** //
132  * #define IDirect3D_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
133  * #define IDirect3D_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevice(p,a,b)
134  * #define IDirect3D_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
135  * #define IDirect3D_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
136  * #define IDirect3D_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
137  * #define IDirect3D_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
138  * #endif
139  *
140  * Comments:
141  * - IDirect3D only contains a pointer to the IDirect3D virtual/jump table. This is the only thing
142  * the user needs to know to use the interface. Of course the structure we will define to
143  * implement this interface will have more fields but the first one will match this pointer.
144  * - The code generated by DECLARE_INTERFACE defines both the structure representing the interface and
145  * the structure for the jump table.
146  * - Each method is declared as a pointer to function field in the jump table. The implementation
147  * will fill this jump table with appropriate values, probably using a static variable, and
148  * initialize the lpVtbl field to point to this variable.
149  * - The IDirect3D_Xxx macros then just derefence the lpVtbl pointer and use the function pointer
150  * corresponding to the macro name. This emulates the behavior of a virtual table and should be
151  * just as fast.
152  * - This C code should be quite compatible with the Windows headers both for code that uses COM
153  * interfaces and for code implementing a COM interface.
154  *
155  *
156  * And in C++ (with gcc's g++):
157  *
158  * typedef struct IDirect3D: public IUnknown {
159  * virtual HRESULT Initialize(REFIID a) = 0;
160  * virtual HRESULT EnumDevices(LPD3DENUMDEVICESCALLBACK a, LPVOID b) = 0;
161  * virtual HRESULT CreateLight(LPDIRECT3DLIGHT* a, IUnknown* b) = 0;
162  * virtual HRESULT CreateMaterial(LPDIRECT3DMATERIAL* a, IUnknown* b) = 0;
163  * virtual HRESULT CreateViewport(LPDIRECT3DVIEWPORT* a, IUnknown* b) = 0;
164  * virtual HRESULT FindDevice(LPD3DFINDDEVICESEARCH a, LPD3DFINDDEVICERESULT b) = 0;
165  * };
166  *
167  * Comments:
168  * - Of course in C++ we use inheritance so that we don't have to duplicate the method definitions.
169  * - Finally there is no IDirect3D_Xxx macro. These are not needed in C++ unless the CINTERFACE
170  * macro is defined in which case we would not be here.
171  */
172 
173 #if defined(__cplusplus) && !defined(CINTERFACE)
174 
175 /* C++ interface */
176 
177 #define STDMETHOD(method) virtual HRESULT STDMETHODCALLTYPE method
178 #define STDMETHOD_(type,method) virtual type STDMETHODCALLTYPE method
179 #define STDMETHODV(method) virtual HRESULT STDMETHODVCALLTYPE method
180 #define STDMETHODV_(type,method) virtual type STDMETHODVCALLTYPE method
181 
182 #define PURE = 0
183 #define THIS_
184 #define THIS void
185 
186 #define interface struct
187 #define DECLARE_INTERFACE(iface) interface DECLSPEC_NOVTABLE iface
188 #define DECLARE_INTERFACE_(iface,ibase) interface DECLSPEC_NOVTABLE iface : public ibase
189 #define DECLARE_INTERFACE_IID_(iface, ibase, iid) interface DECLSPEC_UUID(iid) DECLSPEC_NOVTABLE iface : public ibase
190 
191 #define BEGIN_INTERFACE
192 #define END_INTERFACE
193 
194 #else /* __cplusplus && !CINTERFACE */
195 
196 /* C interface */
197 
198 #define STDMETHOD(method) HRESULT (STDMETHODCALLTYPE *method)
199 #define STDMETHOD_(type,method) type (STDMETHODCALLTYPE *method)
200 #define STDMETHODV(method) HRESULT (STDMETHODVCALLTYPE *method)
201 #define STDMETHODV_(type,method) type (STDMETHODVCALLTYPE *method)
202 
203 #define PURE
204 #define THIS_ INTERFACE *This,
205 #define THIS INTERFACE *This
206 
207 #define interface struct
208 
209 #ifdef __WINESRC__
210 #define CONST_VTABLE
211 #endif
212 
213 #ifdef CONST_VTABLE
214 #undef CONST_VTBL
215 #define CONST_VTBL const
216 #define DECLARE_INTERFACE(iface) \
217  typedef interface iface { const struct iface##Vtbl *lpVtbl; } iface; \
218  typedef struct iface##Vtbl iface##Vtbl; \
219  struct iface##Vtbl
220 #else
221 #undef CONST_VTBL
222 #define CONST_VTBL
223 #define DECLARE_INTERFACE(iface) \
224  typedef interface iface { struct iface##Vtbl *lpVtbl; } iface; \
225  typedef struct iface##Vtbl iface##Vtbl; \
226  struct iface##Vtbl
227 #endif
228 #define DECLARE_INTERFACE_(iface,ibase) DECLARE_INTERFACE(iface)
229 #define DECLARE_INTERFACE_IID_(iface, ibase, iid) DECLARE_INTERFACE_(iface, ibase)
230 
231 #define BEGIN_INTERFACE
232 #define END_INTERFACE
233 
234 #endif /* __cplusplus && !CINTERFACE */
235 
236 #ifndef __IRpcStubBuffer_FWD_DEFINED__
237 #define __IRpcStubBuffer_FWD_DEFINED__
238 typedef interface IRpcStubBuffer IRpcStubBuffer;
239 #endif
240 #ifndef __IRpcChannelBuffer_FWD_DEFINED__
241 #define __IRpcChannelBuffer_FWD_DEFINED__
243 #endif
244 
245 #ifndef RC_INVOKED
246 /* For compatibility only, at least for now */
247 #include <stdlib.h>
248 #endif
249 
250 #include <wtypes.h>
251 #include <unknwn.h>
252 #include <objidl.h>
253 
254 #include <guiddef.h>
255 #ifndef INITGUID
256 #include <cguid.h>
257 #endif
258 
259 #ifdef __cplusplus
260 extern "C" {
261 #endif
262 
263 #ifndef NONAMELESSSTRUCT
264 #define LISet32(li, v) ((li).HighPart = (v) < 0 ? -1 : 0, (li).LowPart = (v))
265 #define ULISet32(li, v) ((li).HighPart = 0, (li).LowPart = (v))
266 #else
267 #define LISet32(li, v) ((li).u.HighPart = (v) < 0 ? -1 : 0, (li).u.LowPart = (v))
268 #define ULISet32(li, v) ((li).u.HighPart = 0, (li).u.LowPart = (v))
269 #endif
270 
271 /*****************************************************************************
272  * Standard API
273  */
275 
276 typedef enum tagCOINIT
277 {
278  COINIT_APARTMENTTHREADED = 0x2, /* Apartment model */
279  COINIT_MULTITHREADED = 0x0, /* OLE calls objects on any thread */
280  COINIT_DISABLE_OLE1DDE = 0x4, /* Don't use DDE for Ole1 support */
281  COINIT_SPEED_OVER_MEMORY = 0x8 /* Trade memory for speed */
282 } COINIT;
283 
285 
287 HRESULT
288 WINAPI
290  _In_opt_ LPVOID lpReserved,
292 
293 void WINAPI CoUninitialize(void);
297 
298 HINSTANCE WINAPI CoLoadLibrary(_In_ LPOLESTR lpszLibName, _In_ BOOL bAutoFree);
299 void WINAPI CoFreeAllLibraries(void);
301 void WINAPI CoFreeUnusedLibraries(void);
302 
303 void
304 WINAPI
306  _In_ DWORD dwUnloadDelay,
308 
310 HRESULT
311 WINAPI
313  _In_ REFCLSID rclsid,
314  _In_opt_ LPUNKNOWN pUnkOuter,
315  _In_ DWORD dwClsContext,
316  _In_ REFIID iid,
317  _Outptr_ _At_(*ppv, _Post_readable_size_(_Inexpressible_(varies))) LPVOID *ppv);
318 
320 HRESULT
321 WINAPI
323  _In_ REFCLSID rclsid,
324  _In_opt_ LPUNKNOWN pUnkOuter,
325  _In_ DWORD dwClsContext,
326  _In_opt_ COSERVERINFO *pServerInfo,
327  _In_ ULONG cmq,
328  _Inout_updates_(cmq) MULTI_QI *pResults);
329 
331 HRESULT
332 WINAPI
334  _In_opt_ COSERVERINFO *pServerInfo,
335  _In_opt_ CLSID *pClsid,
336  _In_opt_ IUnknown *punkOuter,
337  _In_ DWORD dwClsCtx,
338  _In_ DWORD grfMode,
339  _In_ _Null_terminated_ OLECHAR *pwszName,
340  _In_ DWORD dwCount,
341  _Inout_updates_(dwCount) MULTI_QI *pResults);
342 
344 HRESULT
345 WINAPI
347  _In_opt_ COSERVERINFO *pServerInfo,
348  _In_opt_ CLSID *pClsid,
349  _In_opt_ IUnknown *punkOuter,
350  _In_ DWORD dwClsCtx,
351  _In_ IStorage *pstg,
352  _In_ DWORD dwCount,
353  _Inout_updates_(dwCount) MULTI_QI *pResults);
354 
356 HRESULT
357 WINAPI
359  _In_ DWORD dwMemContext,
360  _Outptr_ LPMALLOC *lpMalloc);
361 
362 _Ret_opt_
366 LPVOID
367 WINAPI
369 
370 void
371 WINAPI
374 
375 _Ret_opt_
378 LPVOID
379 WINAPI
383 
386 
388 
389 /* class registration flags; passed to CoRegisterClassObject */
390 typedef enum tagREGCLS
391 {
397 } REGCLS;
398 
400 HRESULT
401 WINAPI
403  _In_ REFCLSID rclsid,
404  _In_ DWORD dwClsContext,
405  _In_opt_ COSERVERINFO *pServerInfo,
406  _In_ REFIID iid,
407  _Outptr_ LPVOID *ppv);
408 
410 HRESULT
411 WINAPI
413  _In_ REFCLSID rclsid,
415  _In_ DWORD dwClsContext,
416  _In_ DWORD flags,
417  _Out_ LPDWORD lpdwRegister);
418 
420 HRESULT
421 WINAPI
423  _In_ DWORD dwRegister);
424 
426 HRESULT
427 WINAPI
429  _In_ REFIID riid,
430  _Out_ CLSID *pclsid);
431 
433 HRESULT
434 WINAPI
436  _In_ REFIID riid,
437  _In_ REFCLSID rclsid);
438 
439 _Check_return_ HRESULT WINAPI CoRegisterSurrogate(_In_ LPSURROGATE pSurrogate);
444 
445 /* marshalling */
446 
448 HRESULT
449 WINAPI
451  _In_opt_ LPUNKNOWN punkOuter,
452  _Outptr_ LPUNKNOWN *ppunkMarshal);
453 
455 HRESULT
456 WINAPI
458  _In_ LPSTREAM pStm,
459  _In_ REFIID iid,
460  _Outptr_ LPVOID *ppv);
461 
463 HRESULT
464 WINAPI
467  _In_ REFIID riid,
469  _In_ DWORD dwDestContext,
470  _In_opt_ LPVOID pvDestContext,
471  _In_ DWORD mshlflags);
472 
474 HRESULT
475 WINAPI
477  _In_ REFIID riid,
479  _In_ DWORD dwDestContext,
480  _In_opt_ LPVOID pvDestContext,
481  _In_ DWORD mshlflags,
482  _Outptr_ LPMARSHAL *ppMarshal);
483 
485 
487 HRESULT
488 WINAPI
490  _In_ LPSTREAM pStm,
491  _In_ REFIID riid,
493  _In_ DWORD dwDestContext,
494  _In_opt_ LPVOID pvDestContext,
495  _In_ DWORD mshlflags);
496 
498 HRESULT
499 WINAPI
501  _In_ REFIID riid,
503  _Outptr_ LPSTREAM *ppStm);
504 
506 
508 HRESULT
509 WINAPI
511  _In_ LPUNKNOWN lpUnk,
513 
515 
517 HRESULT
518 WINAPI
520  _In_ LPSTREAM pStm,
521  _In_ REFIID riid,
522  _Outptr_ LPVOID *ppv);
523 
525 HRESULT
526 WINAPI
529  _In_ BOOL fLock,
530  _In_ BOOL fLastUnlockReleases);
531 
533 
534 /* security */
535 
537 HRESULT
538 WINAPI
541  _In_ LONG cAuthSvc,
542  _In_reads_opt_(cAuthSvc) SOLE_AUTHENTICATION_SERVICE *asAuthSvc,
543  _In_opt_ void *pReserved1,
544  _In_ DWORD dwAuthnLevel,
545  _In_ DWORD dwImpLevel,
546  _In_opt_ void *pReserved2,
547  _In_ DWORD dwCapabilities,
548  _In_opt_ void *pReserved3);
549 
551 HRESULT
552 WINAPI
554  _In_ REFIID riid,
555  _Outptr_ void **ppInterface);
556 
558 HRESULT
559 WINAPI
561  _In_opt_ IUnknown *pContext,
562  _Outptr_ IUnknown **ppOldContext);
563 
565 HRESULT
566 WINAPI
568  _Out_ DWORD *pcAuthSvc,
569  _Outptr_result_buffer_(*pcAuthSvc) SOLE_AUTHENTICATION_SERVICE **asAuthSvc);
570 
572 HRESULT
573 WINAPI
575  _In_ IUnknown *pProxy,
576  _Out_opt_ DWORD *pwAuthnSvc,
577  _Out_opt_ DWORD *pAuthzSvc,
578  _Outptr_opt_ OLECHAR **pServerPrincName,
579  _Out_opt_ DWORD *pAuthnLevel,
580  _Out_opt_ DWORD *pImpLevel,
582  _Out_opt_ DWORD *pCapabilities);
583 
585 HRESULT
586 WINAPI
588  _In_ IUnknown *pProxy,
589  _In_ DWORD dwAuthnSvc,
590  _In_ DWORD dwAuthzSvc,
591  _In_opt_ OLECHAR *pServerPrincName,
592  _In_ DWORD dwAuthnLevel,
593  _In_ DWORD dwImpLevel,
595  _In_ DWORD dwCapabilities);
596 
598 HRESULT
600  _In_ IUnknown *pProxy,
601  _Outptr_ IUnknown **ppCopy);
602 
604 
606 HRESULT
607 WINAPI
609  _Out_opt_ DWORD *pAuthnSvc,
610  _Out_opt_ DWORD *pAuthzSvc,
611  _Outptr_opt_ OLECHAR **pServerPrincName,
612  _Out_opt_ DWORD *pAuthnLevel,
613  _Out_opt_ DWORD *pImpLevel,
615  _Inout_opt_ DWORD *pCapabilities);
616 
618 
619 /* misc */
620 
622 HRESULT
623 WINAPI
625  _In_ REFCLSID clsidOld,
627 
629 HRESULT
630 WINAPI
632  _In_ REFCLSID clsidOld,
633  _In_ REFCLSID clsidNew);
634 
635 HRESULT
636 WINAPI
638  _In_ IUnknown *pUnk,
640 
642 HRESULT
643 WINAPI
645  _In_ REFIID riid,
646  _Outptr_ LPVOID *ppv);
647 
649 HRESULT
650 WINAPI
652  _In_ IInitializeSpy *spy,
653  _Out_ ULARGE_INTEGER *cookie);
654 
656 HRESULT
657 WINAPI
659  _In_ ULARGE_INTEGER cookie);
660 
663 
664 BOOL
665 WINAPI
667  _In_ WORD nDosDate,
668  _In_ WORD nDosTime,
669  _Out_ FILETIME *lpFileTime);
670 
671 BOOL
672 WINAPI
674  _In_ FILETIME *lpFileTime,
675  _Out_ WORD *lpDosDate,
676  _Out_ WORD *lpDosTime);
677 
679 
681 HRESULT
682 WINAPI
684  _In_opt_ LPMESSAGEFILTER lpMessageFilter,
686 
687 HRESULT
688 WINAPI
690  _In_ REFGUID ExtensionGuid,
691  _In_ IChannelHook *pChannelHook);
692 
693 typedef enum tagCOWAIT_FLAGS
694 {
695  COWAIT_WAITALL = 0x00000001,
696  COWAIT_ALERTABLE = 0x00000002,
698 } COWAIT_FLAGS;
699 
701 HRESULT
702 WINAPI
706  _In_ ULONG cHandles,
707  _In_reads_(cHandles) LPHANDLE pHandles,
708  _Out_ LPDWORD lpdwindex);
709 
710 /*****************************************************************************
711  * GUID API
712  */
713 
715 HRESULT
716 WINAPI
718  _In_ REFCLSID id,
719  _Outptr_ LPOLESTR*);
720 
722 HRESULT
723 WINAPI
725  _In_ LPCOLESTR,
726  _Out_ LPCLSID);
727 
729 HRESULT
730 WINAPI
732  _In_ LPCOLESTR progid,
733  _Out_ LPCLSID riid);
734 
736 HRESULT
737 WINAPI
740  _Outptr_ LPOLESTR *lplpszProgID);
741 
743 INT
744 WINAPI
746  _In_ REFGUID id,
747  _Out_writes_to_(cmax, return) LPOLESTR str,
748  _In_ INT cmax);
749 
751 HRESULT
752 WINAPI
754  _In_ LPCOLESTR lpsz,
755  _Out_ LPIID lpiid);
756 
757 /*****************************************************************************
758  * COM Server dll - exports
759  */
760 
762 HRESULT
763 WINAPI
765  _In_ REFCLSID rclsid,
766  _In_ REFIID riid,
768 
770 
771 /* shouldn't be here, but is nice for type checking */
772 #ifdef __WINESRC__
775 #endif
776 
777 
778 /*****************************************************************************
779  * Data Object
780  */
781 
782 HRESULT
783 WINAPI
785  _Outptr_ LPDATAADVISEHOLDER *ppDAHolder);
786 
787 HRESULT
788 WINAPI
790  _In_opt_ LPUNKNOWN pUnkOuter,
791  _In_ REFCLSID rclsid,
792  _In_ REFIID iid,
793  _Out_ LPVOID *ppv);
794 
795 /*****************************************************************************
796  * Moniker API
797  */
798 
800 HRESULT
801 WINAPI
803  _In_ LPMONIKER pmk,
804  _In_ DWORD grfOpt,
805  _In_ REFIID iidResult,
806  _Outptr_ LPVOID *ppvResult);
807 
809 HRESULT
810 WINAPI
812  _In_ LPCWSTR pszName,
813  _In_opt_ BIND_OPTS *pBindOptions,
814  _In_ REFIID riid,
815  _Outptr_ void **ppv);
816 
818 
820 HRESULT
821 WINAPI
824  _Outptr_ LPBC *ppbc);
825 
827 HRESULT
828 WINAPI
830  _In_ REFCLSID rclsid,
831  _Outptr_ LPMONIKER *ppmk);
832 
834 HRESULT
835 WINAPI
837  _In_ LPCOLESTR lpszPathName,
838  _Outptr_ LPMONIKER *ppmk);
839 
841 HRESULT
842 WINAPI
844  _In_opt_ LPMONIKER pmkFirst,
845  _In_opt_ LPMONIKER pmkRest,
846  _Outptr_ LPMONIKER *ppmkComposite);
847 
849 HRESULT
850 WINAPI
852  _In_ LPCOLESTR lpszDelim,
853  _In_ LPCOLESTR lpszItem,
854  _Outptr_ LPMONIKER *ppmk);
855 
857 HRESULT
858 WINAPI
860  _In_opt_ LPUNKNOWN punk,
861  _Outptr_ LPMONIKER *ppmk);
862 
864 HRESULT
865 WINAPI
867  _In_opt_ LPUNKNOWN punk,
868  _Outptr_ LPMONIKER *ppmk);
869 
871 HRESULT
872 WINAPI
874  _In_ LPCOLESTR filePathName,
875  _Out_ CLSID *pclsid);
876 
878 HRESULT
879 WINAPI
883 
885 HRESULT
886 WINAPI
888  _In_ LPBC pbc,
889  _In_ LPCOLESTR szUserName,
890  _Out_ ULONG *pchEaten,
891  _Outptr_ LPMONIKER *ppmk);
892 
894 HRESULT
895 WINAPI
897  _In_ IMoniker *pmkThis,
898  _In_ IMoniker *pmkOther,
899  _Outptr_ IMoniker **ppmkCommon);
900 
902 HRESULT
903 WINAPI
905  _In_ LPMONIKER pmkSrc,
906  _In_ LPMONIKER pmkDest,
907  _Outptr_ LPMONIKER *ppmkRelPath,
909 
910 /*****************************************************************************
911  * Storage API
912  */
913 #define STGM_DIRECT 0x00000000
914 #define STGM_TRANSACTED 0x00010000
915 #define STGM_SIMPLE 0x08000000
916 #define STGM_READ 0x00000000
917 #define STGM_WRITE 0x00000001
918 #define STGM_READWRITE 0x00000002
919 #define STGM_SHARE_DENY_NONE 0x00000040
920 #define STGM_SHARE_DENY_READ 0x00000030
921 #define STGM_SHARE_DENY_WRITE 0x00000020
922 #define STGM_SHARE_EXCLUSIVE 0x00000010
923 #define STGM_PRIORITY 0x00040000
924 #define STGM_DELETEONRELEASE 0x04000000
925 #define STGM_CREATE 0x00001000
926 #define STGM_CONVERT 0x00020000
927 #define STGM_FAILIFTHERE 0x00000000
928 #define STGM_NOSCRATCH 0x00100000
929 #define STGM_NOSNAPSHOT 0x00200000
930 #define STGM_DIRECT_SWMR 0x00400000
931 
932 #define STGFMT_STORAGE 0
933 #define STGFMT_FILE 3
934 #define STGFMT_ANY 4
935 #define STGFMT_DOCFILE 5
936 
937 typedef struct tagSTGOPTIONS
938 {
943 } STGOPTIONS;
944 
946 HRESULT
947 WINAPI
949  _In_ REFIID rclsid,
950  _Outptr_ LPOLESTR *lplpsz);
951 
953 HRESULT
954 WINAPI
956  _In_opt_ _Null_terminated_ LPCOLESTR pwcsName,
957  _In_ DWORD grfMode,
959  _Outptr_ IStorage **ppstgOpen);
960 
962 HRESULT
963 WINAPI
966  _In_ DWORD,
967  _In_ DWORD,
968  _In_ DWORD,
970  _In_opt_ void*,
971  _In_ REFIID,
972  _Outptr_ void**);
973 
975 HRESULT
976 WINAPI
978  _In_ _Null_terminated_ LPCOLESTR fn);
979 
981 HRESULT
982 WINAPI
984  _In_ ILockBytes *plkbyt);
985 
987 HRESULT
988 WINAPI
990  _In_opt_ _Null_terminated_ const OLECHAR *pwcsName,
991  _In_opt_ IStorage *pstgPriority,
992  _In_ DWORD grfMode,
993  _In_opt_z_ SNB snbExclude,
995  _Outptr_ IStorage **ppstgOpen);
996 
998 HRESULT
999 WINAPI
1001  _In_ _Null_terminated_ const WCHAR *pwcwName,
1002  _In_ DWORD grfMode,
1003  _In_ DWORD stgfmt,
1004  _In_ DWORD grfAttrs,
1005  _Inout_opt_ STGOPTIONS *pStgOptions,
1006  _In_opt_ void *reserved,
1007  _In_ REFIID riid,
1008  _Outptr_ void **ppObjectOpen);
1009 
1011 HRESULT
1012 WINAPI
1014  _In_ ILockBytes *plkbyt,
1015  _In_ DWORD grfMode,
1017  _Outptr_ IStorage **ppstgOpen);
1018 
1020 HRESULT
1021 WINAPI
1023  _In_ ILockBytes *plkbyt,
1024  _In_opt_ IStorage *pstgPriority,
1025  _In_ DWORD grfMode,
1026  _In_opt_z_ SNB snbExclude,
1028  _Outptr_ IStorage **ppstgOpen);
1029 
1031 HRESULT
1032 WINAPI
1033 StgSetTimes(
1034  _In_ _Null_terminated_ OLECHAR const *lpszName,
1035  _In_opt_ FILETIME const *pctime,
1036  _In_opt_ FILETIME const *patime,
1037  _In_opt_ FILETIME const *pmtime);
1038 
1039 #ifdef __cplusplus
1040 }
1041 #endif
1042 
1043 #ifndef __WINESRC__
1044 # include <urlmon.h>
1045 #endif
1046 #include <propidl.h>
1047 
1048 #ifndef __WINESRC__
1049 
1050 #define FARSTRUCT
1051 #define HUGEP
1052 
1053 #define WINOLEAPI STDAPI
1054 #define WINOLEAPI_(type) STDAPI_(type)
1055 
1056 #endif /* __WINESRC__ */
1057 
1058 #endif /* _OBJBASE_H_ */
interface IMarshal * LPMARSHAL
Definition: objfwd.h:11
void WINAPI CoFreeAllLibraries(void)
Definition: compobj.c:3564
static LPCLSID pClsidNew
Definition: compobj.c:71
WCHAR OLECHAR
Definition: compat.h:1933
_Check_return_ HRESULT WINAPI StgCreateStorageEx(_In_opt_ _Null_terminated_ const WCHAR *, _In_ DWORD, _In_ DWORD, _In_ DWORD, _Inout_opt_ STGOPTIONS *, _In_opt_ void *, _In_ REFIID, _Outptr_ void **)
#define _In_opt_z_
Definition: no_sal2.h:221
USHORT reserved
Definition: objbase.h:940
_Check_return_ HRESULT WINAPI CoRevokeInitializeSpy(_In_ ULARGE_INTEGER cookie)
#define REFIID
Definition: guiddef.h:113
_Check_return_ HRESULT WINAPI CreateAntiMoniker(_Outptr_ LPMONIKER *ppmk)
_Check_return_ HRESULT WINAPI CoRegisterInitializeSpy(_In_ IInitializeSpy *spy, _Out_ ULARGE_INTEGER *cookie)
#define _Post_invalid_
Definition: no_sal2.h:457
interface IRunningObjectTable * LPRUNNINGOBJECTTABLE
Definition: objfwd.h:17
Definition: scsiwmi.h:51
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
interface IDataAdviseHolder * LPDATAADVISEHOLDER
Definition: objfwd.h:22
void WINAPI CoTaskMemFree(_In_opt_ __drv_freesMem(Mem) _Post_invalid_ LPVOID ptr)
interface IBindCtx * LPBC
Definition: objfwd.h:18
interface IMessageFilter * LPMESSAGEFILTER
Definition: objfwd.h:14
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159
interface IMalloc * LPMALLOC
Definition: objfwd.h:12
REFIID riid
Definition: precomp.h:44
DWORD WINAPI CoGetCurrentProcess(void)
Definition: compobj.c:3913
ULONG WINAPI CoReleaseServerProcess(void)
Definition: compobj.c:4102
#define REFCLSID
Definition: guiddef.h:112
#define __WINE_ALLOC_SIZE(x)
Definition: winnt_old.h:84
HRESULT WINAPI CoGetApartmentType(_Out_ APTTYPE *type, _Out_ APTTYPEQUALIFIER *qualifier)
#define _In_reads_(size)
Definition: no_sal2.h:228
HRESULT WINAPI CreateDataAdviseHolder(_Outptr_ LPDATAADVISEHOLDER *ppDAHolder)
_Check_return_ HRESULT WINAPI CreateObjrefMoniker(_In_opt_ LPUNKNOWN punk, _Outptr_ LPMONIKER *ppmk)
static DWORD dwCoInit
Definition: compobj.c:68
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define _Outptr_
Definition: no_sal2.h:396
_Check_return_ HRESULT WINAPI CoGetContextToken(_Out_ ULONG_PTR *token)
HRESULT WINAPI DllCanUnloadNow(void) DECLSPEC_HIDDEN
Definition: shsvcs.c:33
_Check_return_ _Out_ PULONG pulSize
Definition: winddi.h:2120
_Check_return_ HRESULT WINAPI StgCreateDocfileOnILockBytes(_In_ ILockBytes *plkbyt, _In_ DWORD grfMode, _In_ DWORD reserved, _Outptr_ IStorage **ppstgOpen)
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
_Check_return_ HRESULT WINAPI StgSetTimes(_In_ _Null_terminated_ OLECHAR const *lpszName, _In_opt_ FILETIME const *pctime, _In_opt_ FILETIME const *patime, _In_opt_ FILETIME const *pmtime)
_Check_return_ HRESULT WINAPI CreateFileMoniker(_In_ LPCOLESTR lpszPathName, _Outptr_ LPMONIKER *ppmk)
#define _Post_readable_size_(size)
Definition: no_sal2.h:464
HRESULT WINAPI CoMarshalHresult(_In_ LPSTREAM pstm, _In_ HRESULT hresult)
#define _Check_return_
Definition: no_sal2.h:13
HRESULT WINAPI CoRevokeMallocSpy(void)
Definition: ifs.c:502
interface IStream * LPSTREAM
Definition: objfwd.h:10
_Check_return_ HRESULT WINAPI CoMarshalInterThreadInterfaceInStream(_In_ REFIID riid, _In_ LPUNKNOWN pUnk, _Outptr_ LPSTREAM *ppStm)
_Check_return_ HRESULT WINAPI CoGetInstanceFromFile(_In_opt_ COSERVERINFO *pServerInfo, _In_opt_ CLSID *pClsid, _In_opt_ IUnknown *punkOuter, _In_ DWORD dwClsCtx, _In_ DWORD grfMode, _In_ _Null_terminated_ OLECHAR *pwszName, _In_ DWORD dwCount, _Inout_updates_(dwCount) MULTI_QI *pResults)
static LPOLESTR
Definition: stg_prop.c:27
#define _Out_writes_to_(size, count)
Definition: no_sal2.h:378
int32_t INT
Definition: typedefs.h:56
HRESULT WINAPI CoRegisterChannelHook(_In_ REFGUID ExtensionGuid, _In_ IChannelHook *pChannelHook)
_Check_return_ HRESULT WINAPI MkParseDisplayName(_In_ LPBC pbc, _In_ LPCOLESTR szUserName, _Out_ ULONG *pchEaten, _Outptr_ LPMONIKER *ppmk)
static IN DWORD IN LPVOID lpvReserved
#define _In_opt_
Definition: no_sal2.h:213
_Check_return_ HRESULT WINAPI StgOpenStorageOnILockBytes(_In_ ILockBytes *plkbyt, _In_opt_ IStorage *pstgPriority, _In_ DWORD grfMode, _In_opt_z_ SNB snbExclude, _Reserved_ DWORD reserved, _Outptr_ IStorage **ppstgOpen)
void WINAPI CoUninitialize(void)
Definition: compobj.c:1991
_Check_return_ HRESULT WINAPI StringFromCLSID(_In_ REFCLSID id, _Outptr_ LPOLESTR *)
HRESULT WINAPI CoUnmarshalHresult(_In_ LPSTREAM pstm, _Out_ HRESULT *phresult)
uint32_t ULONG_PTR
Definition: typedefs.h:63
_Check_return_ HRESULT WINAPI CLSIDFromProgID(_In_ LPCOLESTR progid, _Out_ LPCLSID riid)
_Check_return_ HRESULT WINAPI StgIsStorageFile(_In_ _Null_terminated_ LPCOLESTR fn)
_Check_return_ HRESULT WINAPI CoTreatAsClass(_In_ REFCLSID clsidOld, _In_ REFCLSID clsidNew)
_Check_return_ HRESULT WINAPI CoResumeClassObjects(void)
Definition: compobj.c:3197
_Check_return_ HRESULT WINAPI StgOpenStorage(_In_opt_ _Null_terminated_ const OLECHAR *pwcsName, _In_opt_ IStorage *pstgPriority, _In_ DWORD grfMode, _In_opt_z_ SNB snbExclude, _In_ DWORD reserved, _Outptr_ IStorage **ppstgOpen)
_Check_return_ HRESULT WINAPI CoRegisterPSClsid(_In_ REFIID riid, _In_ REFCLSID rclsid)
enum _APTTYPEQUALIFIER APTTYPEQUALIFIER
static REFIID LPVOID * ppInterface
Definition: metahost.c:34
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
struct tagSTGOPTIONS STGOPTIONS
static LPUNKNOWN
Definition: ndr_ole.c:49
_Check_return_ HRESULT WINAPI StgOpenStorageEx(_In_ _Null_terminated_ const WCHAR *pwcwName, _In_ DWORD grfMode, _In_ DWORD stgfmt, _In_ DWORD grfAttrs, _Inout_opt_ STGOPTIONS *pStgOptions, _In_opt_ void *reserved, _In_ REFIID riid, _Outptr_ void **ppObjectOpen)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
ULONG ulSectorSize
Definition: objbase.h:941
static PVOID ptr
Definition: dispmode.c:27
r reserved
Definition: btrfs.c:2673
_Check_return_ HRESULT WINAPI CoGetTreatAsClass(_In_ REFCLSID clsidOld, _Out_ LPCLSID pClsidNew)
BOOL WINAPI CoIsHandlerConnected(_In_ LPUNKNOWN pUnk)
tagREGCLS
Definition: objbase.h:390
const WCHAR * str
_Check_return_ HRESULT WINAPI GetClassFile(_In_ LPCOLESTR filePathName, _Out_ CLSID *pclsid)
static APTTYPEQUALIFIER * qualifier
Definition: compobj.c:74
#define _Out_
Definition: no_sal2.h:323
#define _At_(target, annos)
Definition: no_sal2.h:11
_Check_return_ HRESULT WINAPI CoImpersonateClient(void)
Definition: compobj.c:4403
_Check_return_ INT WINAPI StringFromGUID2(_In_ REFGUID id, _Out_writes_to_(cmax, return) LPOLESTR str, _In_ INT cmax)
_Check_return_ HRESULT WINAPI CoRegisterSurrogate(_In_ LPSURROGATE pSurrogate)
_Check_return_ HRESULT WINAPI CoGetPSClsid(_In_ REFIID riid, _Out_ CLSID *pclsid)
_Check_return_ HRESULT WINAPI GetRunningObjectTable(_In_ DWORD reserved, _Outptr_ LPRUNNINGOBJECTTABLE *pprot)
_Check_return_ HRESULT WINAPI CoSuspendClassObjects(void)
Definition: compobj.c:4053
_Check_return_ HRESULT WINAPI StringFromIID(_In_ REFIID rclsid, _Outptr_ LPOLESTR *lplpsz)
HINSTANCE WINAPI CoLoadLibrary(_In_ LPOLESTR lpszLibName, _In_ BOOL bAutoFree)
_Check_return_ HRESULT WINAPI CoCreateInstance(_In_ REFCLSID rclsid, _In_opt_ LPUNKNOWN pUnkOuter, _In_ DWORD dwClsContext, _In_ REFIID iid, _Outptr_ _At_(*ppv, _Post_readable_size_(_Inexpressible_(varies))) LPVOID *ppv)
_Check_return_ HRESULT WINAPI CreateBindCtx(_In_ DWORD reserved, _Outptr_ LPBC *ppbc)
enum tagCOWAIT_FLAGS COWAIT_FLAGS
_Check_return_ HRESULT WINAPI StgCreateDocfile(_In_opt_ _Null_terminated_ LPCOLESTR pwcsName, _In_ DWORD grfMode, _Reserved_ DWORD reserved, _Outptr_ IStorage **ppstgOpen)
_Check_return_ HRESULT WINAPI CoLockObjectExternal(_In_ LPUNKNOWN pUnk, _In_ BOOL fLock, _In_ BOOL fLastUnlockReleases)
#define _Out_opt_
Definition: no_sal2.h:339
_Check_return_ HRESULT WINAPI CoInitializeEx(_In_opt_ LPVOID lpReserved, _In_ DWORD dwCoInit)
_Check_return_ HRESULT WINAPI CoQueryProxyBlanket(_In_ IUnknown *pProxy, _Out_opt_ DWORD *pwAuthnSvc, _Out_opt_ DWORD *pAuthzSvc, _Outptr_opt_ OLECHAR **pServerPrincName, _Out_opt_ DWORD *pAuthnLevel, _Out_opt_ DWORD *pImpLevel, _Out_opt_ RPC_AUTH_IDENTITY_HANDLE *pAuthInfo, _Out_opt_ DWORD *pCapabilities)
GLsizeiptr size
Definition: glext.h:5919
void WINAPI CoFreeUnusedLibraries(void)
Definition: compobj.c:3610
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define _Outptr_result_buffer_(size)
Definition: no_sal2.h:414
_Check_return_ HRESULT WINAPI CreateClassMoniker(_In_ REFCLSID rclsid, _Outptr_ LPMONIKER *ppmk)
#define WINAPI
Definition: msvc.h:8
_Check_return_ HRESULT WINAPI MonikerRelativePathTo(_In_ LPMONIKER pmkSrc, _In_ LPMONIKER pmkDest, _Outptr_ LPMONIKER *ppmkRelPath, _In_ BOOL dwReserved)
HRESULT WINAPI CoRegisterMallocSpy(_In_ LPMALLOCSPY pMallocSpy)
unsigned short WORD
Definition: ntddk_ex.h:93
tagCOINIT
Definition: objbase.h:276
const WCHAR * pwcsTemplateFile
Definition: objbase.h:942
_Check_return_ HRESULT WINAPI CoSwitchCallContext(_In_opt_ IUnknown *pContext, _Outptr_ IUnknown **ppOldContext)
unsigned long DWORD
Definition: ntddk_ex.h:95
interface IMallocSpy * LPMALLOCSPY
Definition: objfwd.h:13
BOOL WINAPI CoIsOle1Class(_In_ REFCLSID rclsid)
GLbitfield flags
Definition: glext.h:7161
BOOL WINAPI CoDosDateTimeToFileTime(_In_ WORD nDosDate, _In_ WORD nDosTime, _Out_ FILETIME *lpFileTime)
_Check_return_ HRESULT WINAPI CoWaitForMultipleHandles(_In_ DWORD dwFlags, _In_ DWORD dwTimeout, _In_ ULONG cHandles, _In_reads_(cHandles) LPHANDLE pHandles, _Out_ LPDWORD lpdwindex)
#define _Reserved_
Definition: no_sal2.h:573
REFCLSID clsid
Definition: msctf.c:84
_Check_return_ HRESULT WINAPI IIDFromString(_In_ LPCOLESTR lpsz, _Out_ LPIID lpiid)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
_Check_return_ HRESULT WINAPI CoGetStandardMarshal(_In_ REFIID riid, _In_ LPUNKNOWN pUnk, _In_ DWORD dwDestContext, _In_opt_ LPVOID pvDestContext, _In_ DWORD mshlflags, _Outptr_ LPMARSHAL *ppMarshal)
_Check_return_ HRESULT WINAPI CoCreateGuid(_Out_ GUID *pguid)
HMODULE hLibrary
Definition: odbccp32.c:12
_Check_return_ HRESULT WINAPI CoGetInterfaceAndReleaseStream(_In_ LPSTREAM pStm, _In_ REFIID iid, _Outptr_ LPVOID *ppv)
_Check_return_ HRESULT WINAPI CoCreateFreeThreadedMarshaler(_In_opt_ LPUNKNOWN punkOuter, _Outptr_ LPUNKNOWN *ppunkMarshal)
#define _Outptr_opt_
Definition: no_sal2.h:397
HRESULT WINAPI CoAllowSetForegroundWindow(_In_ IUnknown *pUnk, _In_opt_ LPVOID lpvReserved)
_Check_return_ HRESULT WINAPI ProgIDFromCLSID(_In_ REFCLSID clsid, _Outptr_ LPOLESTR *lplpszProgID)
_Check_return_ HRESULT WINAPI MonikerCommonPrefixWith(_In_ IMoniker *pmkThis, _In_ IMoniker *pmkOther, _Outptr_ IMoniker **ppmkCommon)
_Check_return_ HRESULT WINAPI CoDisconnectObject(_In_ LPUNKNOWN lpUnk, _In_ DWORD reserved)
_Check_return_ HRESULT WINAPI CoUnmarshalInterface(_In_ LPSTREAM pStm, _In_ REFIID riid, _Outptr_ LPVOID *ppv)
interface IMoniker * LPMONIKER
Definition: objfwd.h:9
_Check_return_ HRESULT WINAPI CoGetMarshalSizeMax(_Out_ ULONG *pulSize, _In_ REFIID riid, _In_ LPUNKNOWN pUnk, _In_ DWORD dwDestContext, _In_opt_ LPVOID pvDestContext, _In_ DWORD mshlflags)
HRESULT WINAPI DllUnregisterServer(VOID)
Definition: shsvcs.c:28
#define _In_
Definition: no_sal2.h:204
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD dwTimeout
Definition: wincrypt.h:6081
void WINAPI CoFreeLibrary(_In_ HINSTANCE hLibrary)
_Check_return_ HRESULT WINAPI CoQueryAuthenticationServices(_Out_ DWORD *pcAuthSvc, _Outptr_result_buffer_(*pcAuthSvc) SOLE_AUTHENTICATION_SERVICE **asAuthSvc)
ULONG_PTR SIZE_T
Definition: typedefs.h:78
BOOL WINAPI CoFileTimeToDosDateTime(_In_ FILETIME *lpFileTime, _Out_ WORD *lpDosDate, _Out_ WORD *lpDosTime)
_Check_return_ HRESULT WINAPI CLSIDFromString(_In_ LPCOLESTR, _Out_ LPCLSID)
_Check_return_ HRESULT WINAPI CoGetMalloc(_In_ DWORD dwMemContext, _Outptr_ LPMALLOC *lpMalloc)
_Check_return_ HRESULT WINAPI CreateItemMoniker(_In_ LPCOLESTR lpszDelim, _In_ LPCOLESTR lpszItem, _Outptr_ LPMONIKER *ppmk)
_Check_return_ HRESULT WINAPI CoGetObject(_In_ LPCWSTR pszName, _In_opt_ BIND_OPTS *pBindOptions, _In_ REFIID riid, _Outptr_ void **ppv)
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
_Check_return_ HRESULT WINAPI CoGetClassObject(_In_ REFCLSID rclsid, _In_ DWORD dwClsContext, _In_opt_ COSERVERINFO *pServerInfo, _In_ REFIID iid, _Outptr_ LPVOID *ppv)
_Check_return_ HRESULT WINAPI CoReleaseMarshalData(_In_ LPSTREAM pStm)
unsigned short USHORT
Definition: pedump.c:61
_Check_return_ HRESULT WINAPI StgIsStorageILockBytes(_In_ ILockBytes *plkbyt)
_Check_return_ HRESULT WINAPI CoGetObjectContext(_In_ REFIID riid, _Outptr_ LPVOID *ppv)
_Check_return_ HRESULT WINAPI CoRegisterMessageFilter(_In_opt_ LPMESSAGEFILTER lpMessageFilter, _Outptr_opt_result_maybenull_ LPMESSAGEFILTER *lplpMessageFilter)
#define _Outptr_opt_result_maybenull_
Definition: no_sal2.h:410
#define _When_(expr, annos)
Definition: no_sal2.h:639
#define __drv_freesMem(kind)
Definition: driverspecs.h:254
HRESULT WINAPI DllRegisterServer(VOID)
Definition: shsvcs.c:23
_Check_return_ HRESULT WINAPI CreatePointerMoniker(_In_opt_ LPUNKNOWN punk, _Outptr_ LPMONIKER *ppmk)
_In_ ULONG _In_ ULONG _Inout_updates_(8 *8) ULONG *pul)
Definition: winddi.h:3522
#define _In_reads_opt_(size)
Definition: no_sal2.h:231
void WINAPI CoFreeUnusedLibrariesEx(_In_ DWORD dwUnloadDelay, _In_ DWORD dwReserved)
HRESULT WINAPI CoGetCurrentLogicalThreadId(_Out_ GUID *id)
uint32_t * LPDWORD
Definition: typedefs.h:57
unsigned int ULONG
Definition: retypes.h:1
#define progid(str)
Definition: exdisp.idl:31
enum tagCOINIT COINIT
_Check_return_ HRESULT WINAPI CoRevertToSelf(void)
Definition: compobj.c:4436
LPVOID WINAPI CoTaskMemRealloc(LPVOID pvOld, SIZE_T size)
Definition: ifs.c:440
enum tagREGCLS REGCLS
_Check_return_ HRESULT WINAPI CoGetCallContext(_In_ REFIID riid, _Outptr_ void **ppInterface)
DWORD WINAPI CoBuildVersion(void)
Definition: compobj.c:1767
tagCOWAIT_FLAGS
Definition: objbase.h:693
USHORT usVersion
Definition: objbase.h:939
#define _Ret_opt_
Definition: no_sal2.h:594
#define _Null_terminated_
Definition: no_sal2.h:320
HRESULT WINAPI CoFileTimeNow(_Out_ FILETIME *lpFileTime)
_Check_return_ HRESULT WINAPI CreateGenericComposite(_In_opt_ LPMONIKER pmkFirst, _In_opt_ LPMONIKER pmkRest, _Outptr_ LPMONIKER *ppmkComposite)
_Check_return_ HRESULT WINAPI CoCreateInstanceEx(_In_ REFCLSID rclsid, _In_opt_ LPUNKNOWN pUnkOuter, _In_ DWORD dwClsContext, _In_opt_ COSERVERINFO *pServerInfo, _In_ ULONG cmq, _Inout_updates_(cmq) MULTI_QI *pResults)
_Check_return_ HRESULT WINAPI CoInitializeSecurity(_In_opt_ PSECURITY_DESCRIPTOR pSecDesc, _In_ LONG cAuthSvc, _In_reads_opt_(cAuthSvc) SOLE_AUTHENTICATION_SERVICE *asAuthSvc, _In_opt_ void *pReserved1, _In_ DWORD dwAuthnLevel, _In_ DWORD dwImpLevel, _In_opt_ void *pReserved2, _In_ DWORD dwCapabilities, _In_opt_ void *pReserved3)
ULONG WINAPI CoAddRefServerProcess(void)
Definition: compobj.c:4071
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
_Check_return_ HRESULT WINAPI CoCopyProxy(_In_ IUnknown *pProxy, _Outptr_ IUnknown **ppCopy)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406
_Check_return_ HRESULT WINAPI BindMoniker(_In_ LPMONIKER pmk, _In_ DWORD grfOpt, _In_ REFIID iidResult, _Outptr_ LPVOID *ppvResult)
HRESULT WINAPI CreateDataCache(_In_opt_ LPUNKNOWN pUnkOuter, _In_ REFCLSID rclsid, _In_ REFIID iid, _Out_ LPVOID *ppv)
_Check_return_ HRESULT WINAPI CoQueryClientBlanket(_Out_opt_ DWORD *pAuthnSvc, _Out_opt_ DWORD *pAuthzSvc, _Outptr_opt_ OLECHAR **pServerPrincName, _Out_opt_ DWORD *pAuthnLevel, _Out_opt_ DWORD *pImpLevel, _Outptr_opt_ RPC_AUTHZ_HANDLE *pPrivs, _Inout_opt_ DWORD *pCapabilities)
_Ret_opt_ _Post_writable_byte_size_(size) __drv_allocatesMem(Mem) _Check_return_ LPVOID WINAPI CoTaskMemAlloc(_In_ SIZE_T size) __WINE_ALLOC_SIZE(1)
_Ret_opt_ __drv_allocatesMem(Mem) _Check_return_) LPVOID WINAPI CoTaskMemRealloc(_In_opt_ __drv_freesMem(Mem) _Post_invalid_ LPVOID ptr
Definition: exfuncs.h:1268
_Check_return_ HRESULT WINAPI CoInitialize(_In_opt_ LPVOID lpReserved)
#define _Inout_opt_
Definition: no_sal2.h:258
_Check_return_ HRESULT WINAPI CoSetProxyBlanket(_In_ IUnknown *pProxy, _In_ DWORD dwAuthnSvc, _In_ DWORD dwAuthzSvc, _In_opt_ OLECHAR *pServerPrincName, _In_ DWORD dwAuthnLevel, _In_ DWORD dwImpLevel, _In_opt_ RPC_AUTH_IDENTITY_HANDLE pAuthInfo, _In_ DWORD dwCapabilities)
_Check_return_ HRESULT WINAPI CoRevokeClassObject(_In_ DWORD dwRegister)
_Check_return_ HRESULT WINAPI CoMarshalInterface(_In_ LPSTREAM pStm, _In_ REFIID riid, _In_ LPUNKNOWN pUnk, _In_ DWORD dwDestContext, _In_opt_ LPVOID pvDestContext, _In_ DWORD mshlflags)
_Check_return_ HRESULT WINAPI CoRegisterClassObject(_In_ REFCLSID rclsid, _In_ LPUNKNOWN pUnk, _In_ DWORD dwClsContext, _In_ DWORD flags, _Out_ LPDWORD lpdwRegister)
_Check_return_ HRESULT WINAPI CoGetInstanceFromIStorage(_In_opt_ COSERVERINFO *pServerInfo, _In_opt_ CLSID *pClsid, _In_opt_ IUnknown *punkOuter, _In_ DWORD dwClsCtx, _In_ IStorage *pstg, _In_ DWORD dwCount, _Inout_updates_(dwCount) MULTI_QI *pResults)
_Check_return_ HRESULT WINAPI DllGetClassObject(_In_ REFCLSID rclsid, _In_ REFIID riid, _Outptr_ LPVOID *ppv) DECLSPEC_HIDDEN