37#define BINDCTX_FIRST_TABLE_SIZE 4
96 *ppvObject = &
This->IBindCtx_iface;
97 IBindCtx_AddRef(iface);
121 TRACE(
"%p, refcount %lu.\n", iface, refcount);
141 DWORD lastIndex=
This->bindCtxTableLastIndex;
148 if (lastIndex ==
This->bindCtxTableSize)
155 IUnknown_AddRef(
punk);
158 This->bindCtxTable[lastIndex].pObj =
punk;
159 This->bindCtxTable[lastIndex].pkeyObj =
NULL;
160 This->bindCtxTable[lastIndex].regType = 0;
161 lastIndex= ++
This->bindCtxTableLastIndex;
186 IUnknown_Release(
This->bindCtxTable[
index].pObj);
191 This->bindCtxTable[
j]=
This->bindCtxTable[
j+1];
193 This->bindCtxTableLastIndex--;
210 for(
i=0;
i<
This->bindCtxTableLastIndex;
i++)
212 if(
This->bindCtxTable[
i].pObj)
213 IUnknown_Release(
This->bindCtxTable[
i].pObj);
217 This->bindCtxTableLastIndex = 0;
235 if (pbindopts->cbStruct >
sizeof(
This->options))
237 WARN(
"invalid size %lu.\n", pbindopts->cbStruct);
240 memcpy(&
This->options, pbindopts, pbindopts->cbStruct);
258 size =
min(pbindopts->cbStruct,
sizeof(
This->options));
260 pbindopts->cbStruct =
size;
297 TRACE(
"Overwriting existing key\n");
299 IUnknown_Release(
This->bindCtxTable[
index].pObj);
301 IUnknown_AddRef(
punk);
305 if (
This->bindCtxTableLastIndex ==
This->bindCtxTableSize)
312 This->bindCtxTable[
This->bindCtxTableLastIndex].pObj =
punk;
313 This->bindCtxTable[
This->bindCtxTableLastIndex].regType = 1;
317 This->bindCtxTable[
This->bindCtxTableLastIndex].pkeyObj=
NULL;
322 This->bindCtxTable[
This->bindCtxTableLastIndex].pkeyObj=
325 if (
This->bindCtxTable[
This->bindCtxTableLastIndex].pkeyObj==
NULL)
330 This->bindCtxTableLastIndex++;
332 IUnknown_AddRef(
punk);
355 IUnknown_AddRef(
This->bindCtxTable[
index].pObj);
379 IUnknown_Release(
This->bindCtxTable[
index].pObj);
384 This->bindCtxTable[
j]=
This->bindCtxTable[
j+1];
386 This->bindCtxTableLastIndex--;
397 TRACE(
"(%p,%p)\n",iface,pszkey);
420 for(
i=0; ( (
i<
This->bindCtxTableLastIndex) && (!found));
i++)
422 if(
This->bindCtxTable[
i].regType==1){
424 if ( ( (
This->bindCtxTable[
i].pkeyObj==
NULL) && (pszkey==
NULL) ) ||
425 ( (
This->bindCtxTable[
i].pkeyObj!=
NULL) &&
436 for(
i=0; ( (
i<
This->bindCtxTableLastIndex) && (!found));
i++)
445 TRACE(
"key not found\n");
451 if (!
This->bindCtxTableSize)
459 This->bindCtxTableSize *= 2;
465 if (!
This->bindCtxTable)
499 *bind_context =
NULL;
507 if (!(
object = heap_alloc_zero(
sizeof(*
object))))
512 object->options.cbStruct =
sizeof(
object->options);
514 object->options.dwClassContext = CLSCTX_SERVER;
517 *bind_context = &
object->IBindCtx_iface;
547 res = IMoniker_BindToObject(pmk, pbc,
NULL,
riid, ppvResult);
548 IBindCtx_Release(pbc);
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define HeapFree(x, y, z)
LCID WINAPI GetThreadLocale(void)
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
HRESULT WINAPI GetRunningObjectTable(DWORD reserved, IRunningObjectTable **ret)
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
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
#define memcpy(s1, s2, n)
interface IMoniker * LPMONIKER
static HRESULT WINAPI BindCtxImpl_GetObjectParam(IBindCtx *iface, LPOLESTR pszkey, IUnknown **punk)
static HRESULT BindCtxImpl_GetObjectIndex(BindCtxImpl *, IUnknown *, LPOLESTR, DWORD *)
static ULONG WINAPI BindCtxImpl_Release(IBindCtx *iface)
static HRESULT WINAPI BindCtxImpl_RevokeObjectParam(IBindCtx *iface, LPOLESTR ppenum)
#define BINDCTX_FIRST_TABLE_SIZE
static HRESULT WINAPI BindCtxImpl_EnumObjectParam(IBindCtx *iface, IEnumString **pszkey)
static HRESULT BindCtxImpl_ExpandTable(BindCtxImpl *)
static HRESULT WINAPI BindCtxImpl_GetBindOptions(IBindCtx *iface, BIND_OPTS *pbindopts)
HRESULT WINAPI CreateBindCtx(DWORD reserved, IBindCtx **bind_context)
static HRESULT WINAPI BindCtxImpl_RegisterObjectParam(IBindCtx *iface, LPOLESTR pszkey, IUnknown *punk)
static ULONG WINAPI BindCtxImpl_AddRef(IBindCtx *iface)
static HRESULT WINAPI BindCtxImpl_ReleaseBoundObjects(IBindCtx *)
static HRESULT WINAPI BindCtxImpl_SetBindOptions(IBindCtx *iface, BIND_OPTS *pbindopts)
static BindCtxImpl * impl_from_IBindCtx(IBindCtx *iface)
static HRESULT WINAPI BindCtxImpl_RevokeObjectBound(IBindCtx *iface, IUnknown *punk)
HRESULT WINAPI BindMoniker(LPMONIKER pmk, DWORD grfOpt, REFIID riid, LPVOID *ppvResult)
static HRESULT WINAPI BindCtxImpl_RegisterObjectBound(IBindCtx *iface, IUnknown *punk)
static HRESULT WINAPI BindCtxImpl_GetRunningObjectTable(IBindCtx *iface, IRunningObjectTable **pprot)
static HRESULT WINAPI BindCtxImpl_QueryInterface(IBindCtx *iface, REFIID riid, void **ppvObject)
static const IBindCtxVtbl VT_BindCtxImpl
#define IsEqualIID(riid1, riid2)
DWORD bindCtxTableLastIndex
BindCtxObject * bindCtxTable
#define CONTAINING_RECORD(address, type, field)