[Urlmon] Implement BindAsyncMoniker function

Rolf Kalbermatter rolf.kalbermatter at citeng.com
Fri Dec 23 16:37:03 CST 2005


Changelog
  - dlls/urlmon/urlmon.spec
  - dlls/urlmon/umon.c
      Implement BindAsyncMoniker function

Rolf Kalbermatter

Index: dlls/urlmon/urlmon.spec
===================================================================
RCS file: /home/wine/wine/dlls/urlmon/urlmon.spec,v
retrieving revision 1.41
diff -u -r1.41 urlmon.spec
--- dlls/urlmon/urlmon.spec	11 Nov 2005 10:54:26 -0000	1.41
+++ dlls/urlmon/urlmon.spec	23 Dec 2005 22:20:58 -0000
@@ -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)
Index: dlls/urlmon/umon.c
===================================================================
RCS file: /home/wine/wine/dlls/urlmon/umon.c,v
retrieving revision 1.68
diff -u -r1.68 umon.c
--- dlls/urlmon/umon.c	14 Nov 2005 15:12:43 -0000	1.68
+++ dlls/urlmon/umon.c	23 Dec 2005 22:20:58 -0000
@@ -1350,6 +1350,42 @@
 }
 
 /***********************************************************************
+ *           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.@)
  *
  * Register a bind status callback.




More information about the wine-patches mailing list