urlmon: Improve ObtainUserAgentString conformance to native.
This commit is contained in:
parent
17ba74195b
commit
e4282a59dd
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue