mshtml: Set nsURI's moniker in OnStartURILoad.

oldstable
Jacek Caban 2006-08-09 16:42:24 +02:00 committed by Alexandre Julliard
parent ca595cd799
commit 0c11b48240
1 changed files with 26 additions and 4 deletions

View File

@ -771,13 +771,35 @@ static nsresult NSAPI nsURIContentListener_OnStartURIOpen(nsIURIContentListener
nsACString_Finish(&spec_str);
nsres = nsIURI_QueryInterface(aURI, &IID_nsIWineURI, (void**)&wine_uri);
if(NS_SUCCEEDED(nsres)) {
nsIWineURI_SetNSContainer(wine_uri, This);
nsIWineURI_Release(wine_uri);
}else {
if(NS_FAILED(nsres)) {
WARN("Could not get nsIWineURI interface: %08lx\n", nsres);
return NS_ERROR_NOT_IMPLEMENTED;
}
nsIWineURI_SetNSContainer(wine_uri, This);
if(This->bscallback && This->bscallback->mon) {
LPWSTR url;
HRESULT hres;
hres = IMoniker_GetDisplayName(This->bscallback->mon, NULL, 0, &url);
if(SUCCEEDED(hres)) {
IMoniker *mon = NULL;
hres = CreateURLMoniker(NULL, url, &mon);
if(SUCCEEDED(hres)) {
nsIWineURI_SetMoniker(wine_uri, mon);
IMoniker_Release(mon);
}else {
WARN("CreateURLMoniker failed: %08lx\n", hres);
}
}else {
WARN("GetDisplayName failed: %08lx\n", hres);
}
}
nsIWineURI_Release(wine_uri);
return NS_ERROR_NOT_IMPLEMENTED;
}