4 * Copyright 1999 Corel Corporation
12 #include "debugtools.h"
16 DEFAULT_DEBUG_CHANNEL(urlmon);
18 /* native urlmon.dll uses this key, too */
19 static WCHAR BSCBHolder[] = { '_','B','S','C','B','_','H','o','l','d','e','r','_',0 };
22 /***********************************************************************
23 * CreateAsyncBindCtxEx (URLMON.@)
28 HRESULT WINAPI CreateAsyncBindCtxEx(IBindCtx *ibind, DWORD options,
29 IBindStatusCallback *callback, IEnumFORMATETC *format, IBindCtx** pbind,
32 FIXME("stub, returns failure\n");
37 /***********************************************************************
38 * CreateURLMoniker (URLMON.@)
40 * Create a url moniker
44 * E_OUTOFMEMORY out of memory
45 * MK_E_SYNTAX not a valid url
48 HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
52 if (NULL != pmkContext)
53 FIXME("Non-null pmkContext not implemented\n");
55 return CreateFileMoniker(szURL, ppmk);
58 /***********************************************************************
59 * RegisterBindStatusCallback (URLMON.@)
61 * Register a bind status callback
65 * E_INVALIDARG invalid argument(s)
66 * E_OUTOFMEMORY out of memory
69 HRESULT WINAPI RegisterBindStatusCallback(
71 IBindStatusCallback *pbsc,
72 IBindStatusCallback **ppbscPrevious,
75 IBindStatusCallback *prev;
77 TRACE("(%p,%p,%p,%lu)\n", pbc, pbsc, ppbscPrevious, dwReserved);
79 if (pbc == NULL || pbsc == NULL)
82 if (SUCCEEDED(IBindCtx_GetObjectParam(pbc, BSCBHolder, (IUnknown **)&prev)))
84 IBindCtx_RevokeObjectParam(pbc, BSCBHolder);
86 *ppbscPrevious = prev;
88 IBindStatusCallback_Release(prev);
91 return IBindCtx_RegisterObjectParam(pbc, BSCBHolder, (IUnknown *)pbsc);
94 /***********************************************************************
95 * RevokeBindStatusCallback (URLMON.@)
97 * Unregister a bind status callback
101 * E_INVALIDARG invalid argument(s)
102 * E_FAIL pbsc wasn't registered with pbc
105 HRESULT WINAPI RevokeBindStatusCallback(
107 IBindStatusCallback *pbsc)
109 IBindStatusCallback *callback;
112 TRACE("(%p,%p)\n", pbc, pbsc);
114 if (pbc == NULL || pbsc == NULL)
117 if (SUCCEEDED(IBindCtx_GetObjectParam(pbc, BSCBHolder, (IUnknown **)&callback)))
119 if (callback == pbsc)
121 IBindCtx_RevokeObjectParam(pbc, BSCBHolder);
124 IBindStatusCallback_Release(pbsc);
130 /***********************************************************************
134 HRESULT WINAPI Extract(DWORD Param1, DWORD Param2)
136 TRACE("%lx %lx\n", Param1, Param2);