Improved ObtainUserAgentString stub.

This commit is contained in:
Maarten Lankhorst 2005-06-21 09:44:47 +00:00 committed by Alexandre Julliard
parent 06e23dad02
commit da38b66ace
1 changed files with 6 additions and 0 deletions

View File

@ -269,6 +269,8 @@ HRESULT WINAPI UrlMkGetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBuf
return S_OK;
}
static const CHAR Agent[] = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)";
/**************************************************************************
* ObtainUserAgentString (URLMON.@)
*/
@ -280,6 +282,10 @@ HRESULT WINAPI ObtainUserAgentString(DWORD dwOption, LPSTR pcszUAOut, DWORD *cbS
ERR("dwOption: %ld, must be zero\n", dwOption);
}
if (sizeof(Agent) < *cbSize)
*cbSize = sizeof(Agent);
lstrcpynA(pcszUAOut, Agent, *cbSize);
return S_OK;
}