Improved ObtainUserAgentString stub.
This commit is contained in:
parent
06e23dad02
commit
da38b66ace
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue