diff --git a/dlls/urlmon/session.c b/dlls/urlmon/session.c index 3a843cd6593..0596c1df75f 100644 --- a/dlls/urlmon/session.c +++ b/dlls/urlmon/session.c @@ -514,8 +514,8 @@ static size_t obtain_user_agent(unsigned int version, WCHAR *ret, size_t size) size_t len = 0; HKEY key; - if(version & 0x1000) { - version &= ~0x1000; + if(version & UAS_EXACTLEGACY) { + version &= ~UAS_EXACTLEGACY; if(version == 7) quirks = TRUE; else diff --git a/dlls/urlmon/tests/misc.c b/dlls/urlmon/tests/misc.c index d64dcc5965d..2b3df65d5fc 100644 --- a/dlls/urlmon/tests/misc.c +++ b/dlls/urlmon/tests/misc.c @@ -1515,7 +1515,7 @@ static void test_user_agent(void) if (i != 7) { size = sizeof(ua); - hres = pObtainUserAgentString(i | 0x1000, ua, &size); + hres = pObtainUserAgentString(i | UAS_EXACTLEGACY, ua, &size); ok(hres == S_OK, "ObtainUserAgentString failed: %08x\n", hres); ok(size == strlen(ua) + 1, "unexpected size %u, expected %u\n", size, strlen(ua) + 1); ok(!strcmp(ua, str2), "unexpected UA for version %u %s, expected %s\n", @@ -1523,7 +1523,7 @@ static void test_user_agent(void) } size = sizeof(ua); - hres = pObtainUserAgentString(i != 1 ? i : 0x1007, ua, &size); + hres = pObtainUserAgentString(i != 1 ? i : UAS_EXACTLEGACY | 7, ua, &size); ok(hres == S_OK, "ObtainUserAgentString failed: %08x\n", hres); ok(size == strlen(ua) + 1, "unexpected size %u, expected %u\n", size, strlen(ua) + 1); if(i < 8 && i != 1) diff --git a/include/urlmon.idl b/include/urlmon.idl index fd8d6ce7bc8..867d3ebc959 100644 --- a/include/urlmon.idl +++ b/include/urlmon.idl @@ -2113,6 +2113,8 @@ struct CONFIRMSAFETY DWORD dwFlags; }; +cpp_quote("#define UAS_EXACTLEGACY 0x1000") + cpp_quote("EXTERN_C const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY;") cpp_quote("DEFINE_GUID(CLSID_InternetSecurityManager, 0x7b8a2d94, 0x0ac9, 0x11d1, 0x89, 0x6c, 0x00, 0xc0, 0x4f, 0xB6, 0xbf, 0xc4);")