From 81c446ef5def256073af8daa709dc8237bee4548 Mon Sep 17 00:00:00 2001 From: Rolf Kalbermatter Date: Mon, 26 Dec 2005 12:59:42 +0100 Subject: [PATCH] urlmon: Implement BindAsyncMoniker function. --- dlls/urlmon/umon.c | 36 ++++++++++++++++++++++++++++++++++++ dlls/urlmon/urlmon.spec | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/dlls/urlmon/umon.c b/dlls/urlmon/umon.c index cbf70de7266..ebe5c07b7b0 100644 --- a/dlls/urlmon/umon.c +++ b/dlls/urlmon/umon.c @@ -1349,6 +1349,42 @@ HRESULT WINAPI IsAsyncMoniker(IMoniker *pmk) return S_FALSE; } +/*********************************************************************** + * BindAsyncMoniker (URLMON.@) + * + * Bind a bind status callback to an asynchronous URL Moniker. + * + * PARAMS + * pmk [I] Moniker object to bind status callback to + * grfOpt [I] Options, seems not used + * pbsc [I] Status callback to bind + * iidResult [I] Interface to return + * ppvResult [O] Resulting asynchronous moniker object + * + * RETURNS + * Success: S_OK. + * Failure: E_INVALIDARG, if any argument is invalid, or + * E_OUTOFMEMORY if memory allocation fails. + */ +HRESULT WINAPI BindAsyncMoniker(IMoniker *pmk, DWORD grfOpt, IBindStatusCallback *pbsc, REFIID iidResult, LPVOID *ppvResult) +{ + LPBC pbc = NULL; + HRESULT hr = E_INVALIDARG; + + if (pmk && ppvResult) + { + *ppvResult = NULL; + + hr = CreateAsyncBindCtx(0, pbsc, NULL, &pbc); + if (hr == NOERROR) + { + hr = IMoniker_BindToObject(pmk, pbc, NULL, iidResult, ppvResult); + IBindCtx_Release(pbc); + } + } + return hr; +} + /*********************************************************************** * RegisterBindStatusCallback (URLMON.@) * diff --git a/dlls/urlmon/urlmon.spec b/dlls/urlmon/urlmon.spec index 639675e1ab3..46e5f28a2d1 100644 --- a/dlls/urlmon/urlmon.spec +++ b/dlls/urlmon/urlmon.spec @@ -7,7 +7,7 @@ @ stub AsyncGetClassBits @ stub AsyncInstallDistributionUnit -@ stub BindAsyncMoniker +@ stdcall BindAsyncMoniker(ptr long ptr ptr ptr) @ stdcall CoGetClassObjectFromURL(ptr wstr long long wstr ptr long ptr ptr ptr) @ stub CoInstall @ stdcall CoInternetCombineUrl(wstr wstr long wstr long ptr long)