Commit e4282a59 authored by Misha Koshelev's avatar Misha Koshelev Committed by Alexandre Julliard

urlmon: Improve ObtainUserAgentString conformance to native.

parent 17ba7419
......@@ -304,13 +304,18 @@ HRESULT WINAPI ObtainUserAgentString(DWORD dwOption, LPSTR pcszUAOut, DWORD *cbS
{
FIXME("(%d, %p, %p): stub\n", dwOption, pcszUAOut, cbSize);
if(dwOption) {
ERR("dwOption: %d, must be zero\n", dwOption);
if (pcszUAOut == NULL || cbSize == NULL)
return E_INVALIDARG;
if (*cbSize < sizeof(Agent))
{
*cbSize = sizeof(Agent);
return E_OUTOFMEMORY;
}
if (sizeof(Agent) < *cbSize)
*cbSize = sizeof(Agent);
lstrcpynA(pcszUAOut, Agent, *cbSize);
lstrcpynA(pcszUAOut, Agent, *cbSize);
return S_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment