mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 09:50:52 +00:00
urlmon: Improve ObtainUserAgentString conformance to native.
This commit is contained in:
parent
17ba74195b
commit
e4282a59dd
1 changed files with 8 additions and 3 deletions
|
@ -304,13 +304,18 @@ HRESULT WINAPI ObtainUserAgentString(DWORD dwOption, LPSTR pcszUAOut, DWORD *cbS
|
||||||
{
|
{
|
||||||
FIXME("(%d, %p, %p): stub\n", dwOption, pcszUAOut, cbSize);
|
FIXME("(%d, %p, %p): stub\n", dwOption, pcszUAOut, cbSize);
|
||||||
|
|
||||||
if(dwOption) {
|
if (pcszUAOut == NULL || cbSize == NULL)
|
||||||
ERR("dwOption: %d, must be zero\n", dwOption);
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
if (*cbSize < sizeof(Agent))
|
||||||
|
{
|
||||||
|
*cbSize = sizeof(Agent);
|
||||||
|
return E_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sizeof(Agent) < *cbSize)
|
if (sizeof(Agent) < *cbSize)
|
||||||
*cbSize = sizeof(Agent);
|
*cbSize = sizeof(Agent);
|
||||||
lstrcpynA(pcszUAOut, Agent, *cbSize);
|
lstrcpynA(pcszUAOut, Agent, *cbSize);
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue