sync with trunk r46493
[reactos.git] / dll / win32 / hlink / browse_ctx.c
index a5b73c1..1e15c13 100644 (file)
@@ -155,6 +155,9 @@ static HRESULT WINAPI IHlinkBC_SetBrowseWindowInfo(IHlinkBrowseContext* iface,
     HlinkBCImpl  *This = (HlinkBCImpl*)iface;
     TRACE("(%p)->(%p)\n", This, phlbwi);
 
+    if(!phlbwi)
+        return E_INVALIDARG;
+
     heap_free(This->BrowseWindowInfo);
     This->BrowseWindowInfo = heap_alloc(phlbwi->cbSize);
     memcpy(This->BrowseWindowInfo, phlbwi, phlbwi->cbSize);
@@ -165,8 +168,18 @@ static HRESULT WINAPI IHlinkBC_SetBrowseWindowInfo(IHlinkBrowseContext* iface,
 static HRESULT WINAPI IHlinkBC_GetBrowseWindowInfo(IHlinkBrowseContext* iface,
         HLBWINFO *phlbwi)
 {
-    FIXME("\n");
-    return E_NOTIMPL;
+    HlinkBCImpl  *This = (HlinkBCImpl*)iface;
+    TRACE("(%p)->(%p)\n", This, phlbwi);
+
+    if(!phlbwi)
+        return E_INVALIDARG;
+
+    if(!This->BrowseWindowInfo)
+        phlbwi->cbSize = 0;
+    else
+        memcpy(phlbwi, This->BrowseWindowInfo, This->BrowseWindowInfo->cbSize);
+
+    return S_OK;
 }
 
 static HRESULT WINAPI IHlinkBC_SetInitialHlink(IHlinkBrowseContext* iface,