urlmon: Don't hardcode zone numbers.
This commit is contained in:
parent
56e80e18a6
commit
4ac397b6e3
|
@ -150,7 +150,7 @@ static HRESULT map_url_to_zone(LPCWSTR url, DWORD *zone, LPWSTR *ret_url)
|
||||||
DWORD size=0;
|
DWORD size=0;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
*zone = -1;
|
*zone = URLZONE_INVALID;
|
||||||
|
|
||||||
hres = CoInternetGetSecurityUrl(url, &secur_url, PSU_SECURITY_URL_ONLY, 0);
|
hres = CoInternetGetSecurityUrl(url, &secur_url, PSU_SECURITY_URL_ONLY, 0);
|
||||||
if(hres != S_OK) {
|
if(hres != S_OK) {
|
||||||
|
@ -193,11 +193,11 @@ static HRESULT map_url_to_zone(LPCWSTR url, DWORD *zone, LPWSTR *ret_url)
|
||||||
case DRIVE_FIXED:
|
case DRIVE_FIXED:
|
||||||
case DRIVE_CDROM:
|
case DRIVE_CDROM:
|
||||||
case DRIVE_RAMDISK:
|
case DRIVE_RAMDISK:
|
||||||
*zone = 0;
|
*zone = URLZONE_LOCAL_MACHINE;
|
||||||
hres = S_OK;
|
hres = S_OK;
|
||||||
break;
|
break;
|
||||||
case DRIVE_REMOTE:
|
case DRIVE_REMOTE:
|
||||||
*zone = 3;
|
*zone = URLZONE_INTERNET;
|
||||||
hres = S_OK;
|
hres = S_OK;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -206,7 +206,7 @@ static HRESULT map_url_to_zone(LPCWSTR url, DWORD *zone, LPWSTR *ret_url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(*zone == -1) {
|
if(*zone == URLZONE_INVALID) {
|
||||||
WARN("domains are not yet implemented\n");
|
WARN("domains are not yet implemented\n");
|
||||||
hres = get_zone_from_reg(schema, zone);
|
hres = get_zone_from_reg(schema, zone);
|
||||||
}
|
}
|
||||||
|
@ -495,7 +495,7 @@ static HRESULT WINAPI SecManagerImpl_MapUrlToZone(IInternetSecurityManager *ifac
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!pwszUrl) {
|
if(!pwszUrl) {
|
||||||
*pdwZone = -1;
|
*pdwZone = URLZONE_INVALID;
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue