ReactOS 0.4.16-dev-2354-g16de117
bindctx.c
Go to the documentation of this file.
1/*
2 * BindCtx implementation
3 *
4 * Copyright 1999 Noomen Hamza
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include <stdarg.h>
22#include <string.h>
23
24#define COBJMACROS
25
26#include "winerror.h"
27#include "windef.h"
28#include "winbase.h"
29#include "winnls.h"
30#include "objbase.h"
31
32#include "wine/debug.h"
33#include "wine/heap.h"
34
36
37#define BINDCTX_FIRST_TABLE_SIZE 4
38
39/* data structure of the BindCtx table elements */
40typedef struct BindCtxObject{
41
42 IUnknown* pObj; /* point on a bound object */
43
44 LPOLESTR pkeyObj; /* key associated to this bound object */
45
46 BYTE regType; /* registration type: 1 if RegisterObjectParam and 0 if RegisterObjectBound */
47
49
50/* BindCtx data structure */
51typedef struct BindCtxImpl{
52
54
55 LONG ref; /* reference counter for this object */
56
57 BindCtxObject* bindCtxTable; /* this is a table in which all bounded objects are stored*/
58 DWORD bindCtxTableLastIndex; /* first free index in the table */
59 DWORD bindCtxTableSize; /* size table */
60
61 BIND_OPTS3 options;
62
64
65/* IBindCtx prototype functions : */
69
71{
72return CONTAINING_RECORD(iface, BindCtxImpl, IBindCtx_iface);
73}
74
75/*******************************************************************************
76 * BindCtx_QueryInterface
77 *******************************************************************************/
78static HRESULT WINAPI
80{
82
83 TRACE("(%p %s %p)\n",This, debugstr_guid(riid), ppvObject);
84
85 /* Perform a sanity check on the parameters.*/
86 if (!ppvObject)
87 return E_POINTER;
88
89 /* Initialize the return parameter.*/
90 *ppvObject = 0;
91
92 /* Compare the riid with the interface IDs implemented by this object.*/
94 IsEqualIID(&IID_IBindCtx, riid))
95 {
96 *ppvObject = &This->IBindCtx_iface;
97 IBindCtx_AddRef(iface);
98 return S_OK;
99 }
100
101 return E_NOINTERFACE;
102}
103
104/******************************************************************************
105 * BindCtx_AddRef
106 ******************************************************************************/
108{
110
111 TRACE("(%p)\n",This);
112
113 return InterlockedIncrement(&This->ref);
114}
115
117{
119 ULONG refcount = InterlockedDecrement(&context->ref);
120
121 TRACE("%p, refcount %lu.\n", iface, refcount);
122
123 if (!refcount)
124 {
126 heap_free(context->bindCtxTable);
128 }
129
130 return refcount;
131}
132
133
134/******************************************************************************
135 * BindCtx_RegisterObjectBound
136 ******************************************************************************/
137static HRESULT WINAPI
139{
141 DWORD lastIndex=This->bindCtxTableLastIndex;
142
143 TRACE("(%p,%p)\n",This,punk);
144
145 if (punk==NULL)
146 return S_OK;
147
148 if (lastIndex == This->bindCtxTableSize)
149 {
151 if (FAILED(hr))
152 return hr;
153 }
154
155 IUnknown_AddRef(punk);
156
157 /* put the object in the first free element in the table */
158 This->bindCtxTable[lastIndex].pObj = punk;
159 This->bindCtxTable[lastIndex].pkeyObj = NULL;
160 This->bindCtxTable[lastIndex].regType = 0;
161 lastIndex= ++This->bindCtxTableLastIndex;
162
163 return S_OK;
164}
165
166/******************************************************************************
167 * BindCtx_RevokeObjectBound
168 ******************************************************************************/
169static HRESULT WINAPI
171{
172 DWORD index,j;
173
175
176 TRACE("(%p,%p)\n",This,punk);
177
178 if (!punk)
179 return E_INVALIDARG;
180
181 /* check if the object was registered or not */
183 return MK_E_NOTBOUND;
184
185 if(This->bindCtxTable[index].pObj)
186 IUnknown_Release(This->bindCtxTable[index].pObj);
187 HeapFree(GetProcessHeap(),0,This->bindCtxTable[index].pkeyObj);
188
189 /* left-shift all elements in the right side of the current revoked object */
190 for(j=index; j<This->bindCtxTableLastIndex-1; j++)
191 This->bindCtxTable[j]= This->bindCtxTable[j+1];
192
193 This->bindCtxTableLastIndex--;
194
195 return S_OK;
196}
197
198/******************************************************************************
199 * BindCtx_ReleaseBoundObjects
200 ******************************************************************************/
201static HRESULT WINAPI
203{
204 DWORD i;
205
207
208 TRACE("(%p)\n",This);
209
210 for(i=0;i<This->bindCtxTableLastIndex;i++)
211 {
212 if(This->bindCtxTable[i].pObj)
213 IUnknown_Release(This->bindCtxTable[i].pObj);
214 HeapFree(GetProcessHeap(),0,This->bindCtxTable[i].pkeyObj);
215 }
216
217 This->bindCtxTableLastIndex = 0;
218
219 return S_OK;
220}
221
222/******************************************************************************
223 * BindCtx_SetBindOptions
224 ******************************************************************************/
225static HRESULT WINAPI
226BindCtxImpl_SetBindOptions(IBindCtx* iface,BIND_OPTS *pbindopts)
227{
229
230 TRACE("(%p,%p)\n",This, pbindopts);
231
232 if (pbindopts==NULL)
233 return E_POINTER;
234
235 if (pbindopts->cbStruct > sizeof(This->options))
236 {
237 WARN("invalid size %lu.\n", pbindopts->cbStruct);
238 return E_INVALIDARG;
239 }
240 memcpy(&This->options, pbindopts, pbindopts->cbStruct);
241 return S_OK;
242}
243
244/******************************************************************************
245 * BindCtx_GetBindOptions
246 ******************************************************************************/
247static HRESULT WINAPI
248BindCtxImpl_GetBindOptions(IBindCtx* iface,BIND_OPTS *pbindopts)
249{
251 DWORD size;
252
253 TRACE("(%p,%p)\n",This,pbindopts);
254
255 if (pbindopts==NULL)
256 return E_POINTER;
257
258 size = min(pbindopts->cbStruct, sizeof(This->options));
259 memcpy(pbindopts, &This->options, size);
260 pbindopts->cbStruct = size;
261
262 return S_OK;
263}
264
265/******************************************************************************
266 * BindCtx_GetRunningObjectTable
267 ******************************************************************************/
268static HRESULT WINAPI
270{
272
273 TRACE("(%p,%p)\n",This,pprot);
274
275 if (pprot==NULL)
276 return E_POINTER;
277
278 return GetRunningObjectTable(0, pprot);
279}
280
281/******************************************************************************
282 * BindCtx_RegisterObjectParam
283 ******************************************************************************/
284static HRESULT WINAPI
286{
287 DWORD index=0;
289
290 TRACE("(%p,%s,%p)\n",This,debugstr_w(pszkey),punk);
291
292 if (punk==NULL)
293 return E_INVALIDARG;
294
295 if (pszkey!=NULL && BindCtxImpl_GetObjectIndex(This,NULL,pszkey,&index)==S_OK)
296 {
297 TRACE("Overwriting existing key\n");
298 if(This->bindCtxTable[index].pObj!=NULL)
299 IUnknown_Release(This->bindCtxTable[index].pObj);
300 This->bindCtxTable[index].pObj=punk;
301 IUnknown_AddRef(punk);
302 return S_OK;
303 }
304
305 if (This->bindCtxTableLastIndex == This->bindCtxTableSize)
306 {
308 if (FAILED(hr))
309 return hr;
310 }
311
312 This->bindCtxTable[This->bindCtxTableLastIndex].pObj = punk;
313 This->bindCtxTable[This->bindCtxTableLastIndex].regType = 1;
314
315 if (pszkey==NULL)
316
317 This->bindCtxTable[This->bindCtxTableLastIndex].pkeyObj=NULL;
318
319 else
320 {
321
322 This->bindCtxTable[This->bindCtxTableLastIndex].pkeyObj=
323 HeapAlloc(GetProcessHeap(),0,(sizeof(WCHAR)*(1+lstrlenW(pszkey))));
324
325 if (This->bindCtxTable[This->bindCtxTableLastIndex].pkeyObj==NULL)
326 return E_OUTOFMEMORY;
327 lstrcpyW(This->bindCtxTable[This->bindCtxTableLastIndex].pkeyObj,pszkey);
328 }
329
330 This->bindCtxTableLastIndex++;
331
332 IUnknown_AddRef(punk);
333 return S_OK;
334}
335
336/******************************************************************************
337 * BindCtx_GetObjectParam
338 ******************************************************************************/
339static HRESULT WINAPI
341{
342 DWORD index;
344
345 TRACE("(%p,%s,%p)\n",This,debugstr_w(pszkey),punk);
346
347 if (punk==NULL)
348 return E_POINTER;
349
350 *punk=0;
351
353 return E_FAIL;
354
355 IUnknown_AddRef(This->bindCtxTable[index].pObj);
356
357 *punk = This->bindCtxTable[index].pObj;
358
359 return S_OK;
360}
361
362/******************************************************************************
363 * BindCtx_RevokeObjectParam
364 ******************************************************************************/
365static HRESULT WINAPI
367{
368 DWORD index,j;
369
371
372 TRACE("(%p,%s)\n",This,debugstr_w(ppenum));
373
375 return E_FAIL;
376
377 /* release the object if it's found */
378 if(This->bindCtxTable[index].pObj)
379 IUnknown_Release(This->bindCtxTable[index].pObj);
380 HeapFree(GetProcessHeap(),0,This->bindCtxTable[index].pkeyObj);
381
382 /* remove the object from the table with a left-shifting of all objects in the right side */
383 for(j=index; j<This->bindCtxTableLastIndex-1; j++)
384 This->bindCtxTable[j]= This->bindCtxTable[j+1];
385
386 This->bindCtxTableLastIndex--;
387
388 return S_OK;
389}
390
391/******************************************************************************
392 * BindCtx_EnumObjectParam
393 ******************************************************************************/
394static HRESULT WINAPI
396{
397 TRACE("(%p,%p)\n",iface,pszkey);
398
399 *pszkey = NULL;
400
401 /* not implemented in native either */
402 return E_NOTIMPL;
403}
404
405/********************************************************************************
406 * GetObjectIndex (local function)
407 ********************************************************************************/
409 IUnknown* punk,
410 LPOLESTR pszkey,
411 DWORD *index)
412{
413 DWORD i;
414 BOOL found = FALSE;
415
416 TRACE("(%p,%p,%p,%p)\n",This,punk,pszkey,index);
417
418 if (punk==NULL)
419 /* search object identified by a register key */
420 for(i=0; ( (i<This->bindCtxTableLastIndex) && (!found));i++)
421 {
422 if(This->bindCtxTable[i].regType==1){
423
424 if ( ( (This->bindCtxTable[i].pkeyObj==NULL) && (pszkey==NULL) ) ||
425 ( (This->bindCtxTable[i].pkeyObj!=NULL) &&
426 (pszkey!=NULL) &&
427 (wcscmp(This->bindCtxTable[i].pkeyObj,pszkey)==0)
428 )
429 )
430
431 found = TRUE;
432 }
433 }
434 else
435 /* search object identified by a moniker*/
436 for(i=0; ( (i<This->bindCtxTableLastIndex) && (!found));i++)
437 if(This->bindCtxTable[i].pObj==punk)
438 found = TRUE;
439
440 if (index != NULL)
441 *index=i-1;
442
443 if (found)
444 return S_OK;
445 TRACE("key not found\n");
446 return S_FALSE;
447}
448
450{
451 if (!This->bindCtxTableSize)
452 {
453 This->bindCtxTableSize = BINDCTX_FIRST_TABLE_SIZE;
455 This->bindCtxTableSize * sizeof(BindCtxObject));
456 }
457 else
458 {
459 This->bindCtxTableSize *= 2;
460
461 This->bindCtxTable = HeapReAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,This->bindCtxTable,
462 This->bindCtxTableSize * sizeof(BindCtxObject));
463 }
464
465 if (!This->bindCtxTable)
466 return E_OUTOFMEMORY;
467
468 return S_OK;
469}
470
471static const IBindCtxVtbl VT_BindCtxImpl =
472{
486};
487
488/******************************************************************************
489 * CreateBindCtx (OLE32.@)
490 */
492{
494
495 TRACE("%#lx, %p.\n", reserved, bind_context);
496
497 if (!bind_context) return E_INVALIDARG;
498
499 *bind_context = NULL;
500
501 if (reserved)
502 {
503 WARN("reserved should be 0, not %#lx.\n", reserved);
504 return E_INVALIDARG;
505 }
506
507 if (!(object = heap_alloc_zero(sizeof(*object))))
508 return E_OUTOFMEMORY;
509
510 object->IBindCtx_iface.lpVtbl = &VT_BindCtxImpl;
511 object->ref = 1;
512 object->options.cbStruct = sizeof(object->options);
513 object->options.grfMode = STGM_READWRITE;
514 object->options.dwClassContext = CLSCTX_SERVER;
515 object->options.locale = GetThreadLocale();
516
517 *bind_context = &object->IBindCtx_iface;
518
519 return S_OK;
520}
521
522/******************************************************************************
523 * BindMoniker [OLE32.@]
524 *
525 * Binds to a moniker.
526 *
527 * PARAMS
528 * pmk [I] Moniker to bind to.
529 * grfOpt [I] Reserved option flags. Set to 0.
530 * riid [I] ID of the interface to bind to.
531 * pvResult [O] Address that receives the interface of the object that was bound to.
532 *
533 * RETURNS
534 * Success: S_OK.
535 * Failure: Any HRESULT code.
536 */
538{
539 HRESULT res;
540 IBindCtx * pbc;
541
542 TRACE("%p, %lx, %s, %p.\n", pmk, grfOpt, debugstr_guid(riid), ppvResult);
543
544 res = CreateBindCtx(grfOpt, &pbc);
545 if (SUCCEEDED(res))
546 {
547 res = IMoniker_BindToObject(pmk, pbc, NULL, riid, ppvResult);
548 IBindCtx_Release(pbc);
549 }
550 return res;
551}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define index(s, c)
Definition: various.h:29
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapReAlloc
Definition: compat.h:734
#define HeapFree(x, y, z)
Definition: compat.h:735
#define lstrcpyW
Definition: compat.h:749
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define lstrlenW
Definition: compat.h:750
LCID WINAPI GetThreadLocale(void)
Definition: locale.c:2803
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
Definition: wcs.c:1972
HRESULT WINAPI GetRunningObjectTable(DWORD reserved, IRunningObjectTable **ret)
Definition: moniker.c:729
r reserved
Definition: btrfs.c:3006
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint res
Definition: glext.h:9613
GLsizeiptr size
Definition: glext.h:5919
GLuint index
Definition: glext.h:6031
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 GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
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 GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static BSTR *static LPOLESTR
Definition: varformat.c:44
#define min(a, b)
Definition: monoChain.cc:55
#define STGM_READWRITE
Definition: objbase.h:936
interface IMoniker * LPMONIKER
Definition: objfwd.h:9
static HRESULT WINAPI BindCtxImpl_GetObjectParam(IBindCtx *iface, LPOLESTR pszkey, IUnknown **punk)
Definition: bindctx.c:340
static HRESULT BindCtxImpl_GetObjectIndex(BindCtxImpl *, IUnknown *, LPOLESTR, DWORD *)
Definition: bindctx.c:408
static ULONG WINAPI BindCtxImpl_Release(IBindCtx *iface)
Definition: bindctx.c:116
static HRESULT WINAPI BindCtxImpl_RevokeObjectParam(IBindCtx *iface, LPOLESTR ppenum)
Definition: bindctx.c:366
#define BINDCTX_FIRST_TABLE_SIZE
Definition: bindctx.c:37
static HRESULT WINAPI BindCtxImpl_EnumObjectParam(IBindCtx *iface, IEnumString **pszkey)
Definition: bindctx.c:395
static HRESULT BindCtxImpl_ExpandTable(BindCtxImpl *)
Definition: bindctx.c:449
static HRESULT WINAPI BindCtxImpl_GetBindOptions(IBindCtx *iface, BIND_OPTS *pbindopts)
Definition: bindctx.c:248
HRESULT WINAPI CreateBindCtx(DWORD reserved, IBindCtx **bind_context)
Definition: bindctx.c:491
static HRESULT WINAPI BindCtxImpl_RegisterObjectParam(IBindCtx *iface, LPOLESTR pszkey, IUnknown *punk)
Definition: bindctx.c:285
static ULONG WINAPI BindCtxImpl_AddRef(IBindCtx *iface)
Definition: bindctx.c:107
static HRESULT WINAPI BindCtxImpl_ReleaseBoundObjects(IBindCtx *)
Definition: bindctx.c:202
static HRESULT WINAPI BindCtxImpl_SetBindOptions(IBindCtx *iface, BIND_OPTS *pbindopts)
Definition: bindctx.c:226
static BindCtxImpl * impl_from_IBindCtx(IBindCtx *iface)
Definition: bindctx.c:70
static HRESULT WINAPI BindCtxImpl_RevokeObjectBound(IBindCtx *iface, IUnknown *punk)
Definition: bindctx.c:170
HRESULT WINAPI BindMoniker(LPMONIKER pmk, DWORD grfOpt, REFIID riid, LPVOID *ppvResult)
Definition: bindctx.c:537
static HRESULT WINAPI BindCtxImpl_RegisterObjectBound(IBindCtx *iface, IUnknown *punk)
Definition: bindctx.c:138
static HRESULT WINAPI BindCtxImpl_GetRunningObjectTable(IBindCtx *iface, IRunningObjectTable **pprot)
Definition: bindctx.c:269
static HRESULT WINAPI BindCtxImpl_QueryInterface(IBindCtx *iface, REFIID riid, void **ppvObject)
Definition: bindctx.c:79
static const IBindCtxVtbl VT_BindCtxImpl
Definition: bindctx.c:471
long LONG
Definition: pedump.c:60
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
_In_opt_ IUnknown * punk
Definition: shlwapi.h:158
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
DWORD bindCtxTableLastIndex
Definition: bindctx.c:58
BIND_OPTS3 options
Definition: bindctx.c:61
IBindCtx IBindCtx_iface
Definition: bindctx.c:53
BindCtxObject * bindCtxTable
Definition: bindctx.c:57
LONG ref
Definition: bindctx.c:55
DWORD bindCtxTableSize
Definition: bindctx.c:59
BYTE regType
Definition: bindctx.c:46
LPOLESTR pkeyObj
Definition: bindctx.c:44
IUnknown * pObj
Definition: bindctx.c:42
Definition: http.c:7252
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:3451
#define E_NOINTERFACE
Definition: winerror.h:3479
#define MK_E_NOTBOUND
Definition: winerror.h:3904
#define E_POINTER
Definition: winerror.h:3480
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned char BYTE
Definition: xxhash.c:193