Commit da38b66a authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

Improved ObtainUserAgentString stub.

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